package
7.3.1+incompatible
Repository: https://github.com/scott-the-programmer/go-autorest.git
Documentation: pkg.go.dev

# 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.
EnvironmentFromName returns an Environment based on the common name specified.
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.
InitiateDeviceAuth initiates a device auth flow.
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.
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.
OAuthConfigForTenant returns an OAuthConfig with tenant specific urls for target cloud auth endpoint.
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

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.

# 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.
GermanCloud is the cloud environment operated in Germany.
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.
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.