auth

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapGRPCCreds

func MapGRPCCreds(authToken string) credentials.PerRPCCredentials

Types

type AddressProvider

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

func NewAddressProvider

func NewAddressProvider(url string, c *tls.Config) *AddressProvider

NewAddressProvider returns a new AddressProvider that has been configured with the bosh director url and tlsConfig.

func (*AddressProvider) Addr

func (a *AddressProvider) Addr() (string, error)

Addr returns the url of the user authentication entity from the info response. It returns an error if the request fails or response cannot be decoded.

type Auth

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

func New

func New(a addresser, clientID string, clientSecret string, tlsConfig *tls.Config) *Auth

New returns a new Auth.

func (*Auth) Token

func (a *Auth) Token() (string, error)

Token returns the token provided by the auth endpoint. It returns an error if the request fails or the response cannot be decoded.

type AuthTokenCreds

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

func (AuthTokenCreds) GetRequestMetadata

func (ts AuthTokenCreds) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

func (AuthTokenCreds) RequireTransportSecurity

func (ts AuthTokenCreds) RequireTransportSecurity() bool

RequireTransportSecurity indicates whether the credentials requires transport security.

Jump to

Keyboard shortcuts

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