Codeunit 7801 Azure Functions Code Auth in 25
- App
- System Application
- Namespace
- System.Azure.Functions
Versions171819202122232425262728latest
Source in 25
src/System Application/App/Azure Function/AzureFunctionsCodeAuth.Codeunit.al40 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace System.Azure.Functions;
using System.Utilities;
codeunit 7801 "Azure Functions Code Auth" implements "Azure Functions Authentication"
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;
var
[NonDebuggable]
AuthenticationCodeGlobal, EndpointGlobal : Text;
[NonDebuggable]
procedure SetAuthParameters(Endpoint: Text; AuthenticationCode: Text)
begin
AuthenticationCodeGlobal := AuthenticationCode;
EndpointGlobal := Endpoint;
end;
[NonDebuggable]
procedure Authenticate(var RequestMessage: HttpRequestMessage): Boolean
var
Uri: Codeunit Uri;
UriBuilder: Codeunit "Uri Builder";
begin
UriBuilder.Init(EndpointGlobal);
UriBuilder.AddQueryParameter('Code', AuthenticationCodeGlobal);
UriBuilder.GetUri(Uri);
RequestMessage.SetRequestUri(Uri.GetAbsoluteUri());
exit(true);
end;
}Procedures, 2
| Name | Parameters | Returns | Access | Obsolete |
|---|---|---|---|---|
| SetAuthParameters | (Text, Text) | public | - | |
| Authenticate | (var HttpRequestMessage) | Boolean | public | - |