Documentation ¶
Index ¶
- func WithHTTPClient(client *http.Client) func(source *jwtProfileTokenSource)
- func WithStaticTokenEndpoint(issuer, tokenEndpoint string) func(source *jwtProfileTokenSource)
- type TokenSource
- func NewJWTProfileTokenSource(ctx context.Context, issuer, clientID, keyID string, key []byte, ...) (TokenSource, error)
- func NewJWTProfileTokenSourceFromKeyFile(ctx context.Context, issuer, jsonFile string, scopes []string, ...) (TokenSource, error)
- func NewJWTProfileTokenSourceFromKeyFileData(ctx context.Context, issuer string, jsonData []byte, scopes []string, ...) (TokenSource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHTTPClient ¶
func WithStaticTokenEndpoint ¶
func WithStaticTokenEndpoint(issuer, tokenEndpoint string) func(source *jwtProfileTokenSource)
Types ¶
type TokenSource ¶
func NewJWTProfileTokenSource ¶
func NewJWTProfileTokenSource(ctx context.Context, issuer, clientID, keyID string, key []byte, scopes []string, options ...func(source *jwtProfileTokenSource)) (TokenSource, error)
NewJWTProfileSource returns an implementation of oauth2.TokenSource It will request a token using the OAuth2 JWT Profile Grant, therefore sending an `assertion` by singing a JWT with the provided private key.
The passed context is only used for the call to the Discover endpoint.
func NewJWTProfileTokenSourceFromKeyFile ¶
func NewJWTProfileTokenSourceFromKeyFile(ctx context.Context, issuer, jsonFile string, scopes []string, options ...func(source *jwtProfileTokenSource)) (TokenSource, error)
NewJWTProfileTokenSourceFromKeyFile returns an implementation of TokenSource It will request a token using the OAuth2 JWT Profile Grant, therefore sending an `assertion` by singing a JWT with the provided private key from jsonFile.
The passed context is only used for the call to the Discover endpoint.
func NewJWTProfileTokenSourceFromKeyFileData ¶
func NewJWTProfileTokenSourceFromKeyFileData(ctx context.Context, issuer string, jsonData []byte, scopes []string, options ...func(source *jwtProfileTokenSource)) (TokenSource, error)
NewJWTProfileTokenSourceFromKeyFileData returns an implementation of oauth2.TokenSource It will request a token using the OAuth2 JWT Profile Grant, therefore sending an `assertion` by singing a JWT with the provided private key in jsonData.
The passed context is only used for the call to the Discover endpoint.