auth

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthorizerWrapper

func NewAuthorizerWrapper(autorestAuthorizer autorest.Authorizer) (auth.Authorizer, error)

NewAuthorizerWrapper returns a Hamilton auth.Authorizer that sources tokens from a supplied autorest.BearerAuthorizer

Types

type Authorizer

type Authorizer struct {
	auth.Authorizer
}

func (*Authorizer) BearerAuthorizerCallback

func (c *Authorizer) BearerAuthorizerCallback() *autorest.BearerAuthorizerCallback

BearerAuthorizerCallback is a helper that returns an *autorest.BearerAuthorizerCallback for use in data plane API clients in the Azure SDK

func (*Authorizer) WithAuthorization

func (c *Authorizer) WithAuthorization() autorest.PrepareDecorator

WithAuthorization implements the autorest.Authorizer interface

type AuthorizerWrapper

type AuthorizerWrapper struct {
	// contains filtered or unexported fields
}

AuthorizerWrapper is a Hamilton auth.Authorizer which sources tokens from an autorest.Authorizer Fully supports: - autorest.BearerAuthorizer - autorest.MultiTenantBearerAuthorizer For other types that satisfy autorest.Authorizer, the Authorization and X-Ms-Authorization-Auxiliary headers are parsed for access token values, but additional metadata such as refresh tokens and expiry are not provided.

func (*AuthorizerWrapper) AuxiliaryTokens

func (a *AuthorizerWrapper) AuxiliaryTokens() ([]*oauth2.Token, error)

AuxiliaryTokens returns additional tokens for auxiliary tenant IDs, sourced from an autorest.MultiTenantBearerAuthorizer, for use in multi-tenant scenarios

func (*AuthorizerWrapper) Token

func (a *AuthorizerWrapper) Token() (*oauth2.Token, error)

Token returns an access token using an autorest.BearerAuthorizer struct

type ServicePrincipalToken

type ServicePrincipalToken interface {
	Token() adal.Token
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL