Documentation
¶
Overview ¶
Package msal wraps Microsoft Authentication Library, providing transport for authenticated requests compatible with http.RoundTripper.
Index ¶
Constants ¶
const MicrosoftAuthority = "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47"
MicrosoftAuthority is the authority for Microsoft accounts.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfidentialCredentialTransport ¶
type ConfidentialCredentialTransport struct {
Client confidential.Client
Scopes []string
// Transport is the underlying HTTP transport to use when making requests.
// It will default to http.DefaultTransport if nil.
Transport http.RoundTripper
}
ConfidentialCredentialTransport is an http.RoundTripper that makes requests with the "Authorization Bearer" header set to the token acquired from the confidential client.
func NewConfidentialTransportFromAzureKeyVaultJSON ¶ added in v0.0.2
func NewConfidentialTransportFromAzureKeyVaultJSON(authority, clientID string, vaultJSON []byte) (*ConfidentialCredentialTransport, error)
NewConfidentialTransportFromAzureKeyVaultJSON creates a new ConfidentialCredentialTransport.
authority is the URL of a token authority such as "https://login.microsoftonline.com/<your tenant>".
vaultJSON is the JSON content of a certificate stored in Azure Key Vault, as returned by 'az keyvault secret show'. It should be a JSON object with a property 'value' that contains a base64-encoded PFX-encoded certificate with private key.
func NewConfidentialTransportFromSecret ¶ added in v0.0.2
func NewConfidentialTransportFromSecret(authority, clientID, clientSecret string) (*ConfidentialCredentialTransport, error)
NewConfidentialTransportFromSecret creates a new ConfidentialCredentialTransport. authority is the URL of a token authority such as "https://login.microsoftonline.com/<your tenant>".