Codeunit 9063 Stor. Serv. Auth. Impl. in 26
- App
- System Application
- Namespace
- System.Azure.Storage
Versions171819202122232425262728latest
Source in 26
src/System Application/App/Azure Storage Services Authorization/src/StorServAuthImpl.Codeunit.al69 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.Storage;
codeunit 9063 "Stor. Serv. Auth. Impl."
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;
procedure CreateSAS(SigningKey: SecretText; SignedVersion: Enum "Storage Service API Version"; SignedServices: List of [Enum "SAS Service Type"]; SignedResources: List of [Enum "SAS Resource Type"]; SignedPermissions: List of [Enum "SAS Permission"]; SignedExpiry: DateTime): Interface "Storage Service Authorization"
var
OptionalParams: Record "SAS Parameters";
begin
OptionalParams.Init();
exit(CreateSAS(SigningKey, SignedVersion, SignedServices, SignedResources, SignedPermissions, SignedExpiry, OptionalParams));
end;
procedure CreateSAS(SigningKey: SecretText; SignedVersion: Enum "Storage Service API Version"; SignedServices: List of [Enum "SAS Service Type"]; SignedResources: List of [Enum "SAS Resource Type"]; SignedPermissions: List of [Enum "SAS Permission"]; SignedExpiry: DateTime; OptionalParams: Record "SAS Parameters"): Interface "Storage Service Authorization"
var
StorServAuthSAS: Codeunit "Stor. Serv. Auth. SAS";
begin
StorServAuthSAS.SetSigningKey(SigningKey);
StorServAuthSAS.SetVersion(SignedVersion);
StorServAuthSAS.SetSignedServices(SignedServices);
StorServAuthSAS.SetResources(SignedResources);
StorServAuthSAS.SetSignedPermissions(SignedPermissions);
StorServAuthSAS.SetSignedExpiry(SignedExpiry);
// Set optional parameters
if OptionalParams.SignedStart <> 0DT then
StorServAuthSAS.SetSignedStart(OptionalParams.SignedStart)
else
StorServAuthSAS.SetSignedStart(CurrentDateTime());
StorServAuthSAS.SetIPrange(OptionalParams.SignedIp);
StorServAuthSAS.SetProtocol(OptionalParams.SignedProtocol);
StorServAuthSAS.SetSignedEncryptionScope(OptionalParams.SignedEncryptionScope);
exit(StorServAuthSAS);
end;
procedure SharedKey(SharedKeyToUse: SecretText; ApiVersion: Enum "Storage Service API Version"): Interface "Storage Service Authorization"
var
StorServAuthSharedKey: Codeunit "Stor. Serv. Auth. Shared Key";
begin
StorServAuthSharedKey.SetSharedKey(SharedKeyToUse);
StorServAuthSharedKey.SetApiVersion(ApiVersion);
exit(StorServAuthSharedKey);
end;
procedure ReadySAS(SASToken: SecretText): Interface "Storage Service Authorization"
var
StorServAuthReadySAS: Codeunit "Stor. Serv. Auth. Ready SAS";
begin
StorServAuthReadySAS.SetSharedAccessSignature(SASToken);
exit(StorServAuthReadySAS);
end;
procedure GetDefaultAPIVersion(): Enum "Storage Service API Version"
begin
exit(Enum::"Storage Service API Version"::"2020-10-02");
end;
}
Procedures, 5
| Name | Parameters | Returns | Access | Obsolete |
|---|---|---|---|---|
| GetDefaultAPIVersion | () | Enum Storage Service API Version | public | - |
| CreateSAS | (SecretText, Enum Storage Service API Version, List, List, List, DateTime) | Interface Storage Service Authorization | public | - |
| CreateSAS | (SecretText, Enum Storage Service API Version, List, List, List, DateTime, Record SAS Parameters) | Interface Storage Service Authorization | public | - |
| SharedKey | (SecretText, Enum Storage Service API Version) | Interface Storage Service Authorization | public | - |
| ReadySAS | (SecretText) | Interface Storage Service Authorization | public | - |