# Packages
No description provided by the author
# Functions
CheckForUserCompletion takes a DeviceCode and checks with the Azure AD OAuth endpoint to see if the device flow has: been completed, timed out, or otherwise failed.
DoPollForAsynchronous returns a SendDecorator that polls if the http.Response is for an Azure long-running operation.
ExtractClientID extracts the client identifier from the x-ms-client-request-id header set on the http.Request sent to the service (and returned in the http.Response).
ExtractRequestID extracts the Azure server generated request identifier from the x-ms-request-id header.
GetAsyncOperation retrieves the long-running URL from which to retrieve the OperationResource.
InitiateDeviceAuth initiates a device auth flow.
IsAsynchronousResponse returns true if the passed response indicates that the request will complete asynchronously.
IsAzureError returns true if the passed error is an Azure Service error; false otherwise.
LoadToken restores a Token object from a file located at 'path'.
NewErrorWithError creates a new Error conforming object from the passed packageType, method, statusCode of the given resp (UndefinedStatusCode if resp is nil), message, and original error.
NewOperationResourceRequest allocates and returns a new http.Request to retrieve the OperationResource for an asynchronous operation.
NewServicePrincipalToken creates a ServicePrincipalToken from the supplied Service Principal credentials scoped to the named resource.
NewServicePrincipalTokenFromCertificate create a ServicePrincipalToken from the supplied pkcs12 bytes.
NewServicePrincipalTokenFromManualToken creates a ServicePrincipalToken using the supplied token.
NewServicePrincipalTokenWithSecret create a ServicePrincipalToken using the supplied ServicePrincipalSecret implementation.
SaveToken persists an oauth token at the given location on disk.
WaitForUserCompletion calls CheckForUserCompletion repeatedly until a token is granted or an error state occurs.
WithClientID returns a PrepareDecorator that adds an HTTP extension header of x-ms-client-request-id whose value is passed, undecorated UUID (e.g., "0F39878C-5F76-4DB8-A25D-61D2C193C3CA").
WithErrorUnlessStatusCode returns a RespondDecorator that emits an azure.RequestError by reading the response body unless the response HTTP status code is among the set passed.
WithReturnClientID returns a PrepareDecorator that adds an HTTP extension header of x-ms-return-client-request-id whose boolean value indicates if the value of the x-ms-client-request-id header should be included in the http.Response.
WithReturningClientID returns a PrepareDecorator that adds an HTTP extension header of x-ms-client-request-id whose value is the passed, undecorated UUID (e.g., "0F39878C-5F76-4DB8-A25D-61D2C193C3CA").
# Constants
HeaderAsyncOperation is the Azure header providing the URL from which to obtain the OperationResource for an asynchronous (aka long running) operation.
HeaderClientID is the Azure extension header to set a user-specified request ID.
HeaderRequestID is the Azure extension header of the service generated request ID returned in the response.
HeaderReturnClientID is the Azure extension header to set if the user-specified request ID should be included in the response.
OAuthGrantTypeClientCredentials is the "grant_type" identifier used in credential flows.
OAuthGrantTypeDeviceCode is the "grant_type" identifier used in device flow.
OAuthGrantTypeRefreshToken is the "grant_type" identifier used in refresh token flows.
OperationCanceled says the underlying operation was canceled.
OperationFailed says the underlying operation failed.
OperationSucceeded says the underlying opertion succeeded.
# Variables
ChinaCloud is the cloud environment operated in China.
ErrDeviceAccessDenied represents an access denied error from the token endpoint when using device flow.
ErrDeviceAuthorizationPending represents the server waiting on the user to complete the device flow.
ErrDeviceCodeExpired represents the server timing out and expiring the code during device flow.
ErrDeviceGeneric represents an unknown error from the token endpoint when using device flow.
ErrDeviceSlowDown represents the service telling us we're polling too often during device flow.
PublicCloud is the default public Azure cloud environment.
USGovernmentCloud is the cloud environment for the US Government.
# Structs
DeviceCode is the object returned by the device auth endpoint It contains information to instruct the user to complete the auth flow.
Environment represents a set of endpoints for each of Azure's Clouds.
OAuthConfig represents the endpoints needed in OAuth operations.
OperationError provides additional detail when an operation fails or is canceled.
OperationResource defines a resource describing the state of a long-running operation.
RequestError describes an error response returned by Azure service.
ServiceError encapsulates the error response from an Azure service.
ServicePrincipalCertificateSecret implements ServicePrincipalSecret for generic RSA cert auth with signed JWTs.
ServicePrincipalNoSecret represents a secret type that contains no secret meaning it is not valid for fetching a fresh token.
ServicePrincipalToken encapsulates a Token created for a Service Principal.
ServicePrincipalTokenSecret implements ServicePrincipalSecret for client_secret type authorization.
Token encapsulates the access token used to authorize Azure requests.
TokenError is the object returned by the token exchange endpoint when something is amiss.
# Interfaces
ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form that is submitted when acquiring an oAuth token.
# Type aliases
TokenRefreshCallback is the type representing callbacks that will be called after a successful token refresh.