tokenexchange

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessTokenType     = "urn:ietf:params:oauth:token-type:access_token"
	RefreshTokenType    = "urn:ietf:params:oauth:token-type:refresh_token"
	IDTokenType         = "urn:ietf:params:oauth:token-type:id_token"
	JWTTokenType        = "urn:ietf:params:oauth:token-type:jwt"
	DelegationTokenType = AccessTokenType

	TokenExchangeGrantType = "urn:ietf:params:oauth:grant-type:token-exchange"
)

Variables

This section is empty.

Functions

func WithActorToken

func WithActorToken(token, tokenType string) func(*TokenExchangeRequest)

func WithAudience

func WithAudience(audience []string) func(*TokenExchangeRequest)

func WithRequestedTokenType

func WithRequestedTokenType(tokenType string) func(*TokenExchangeRequest)

func WithResource

func WithResource(resource []string) func(*TokenExchangeRequest)

func WithScope

func WithScope(scope []string) func(*TokenExchangeRequest)

Types

type JWTProfileRequest added in v0.9.0

type JWTProfileRequest struct {
	Assertion string         `schema:"assertion"`
	Scope     oidc.Scopes    `schema:"scope"`
	GrantType oidc.GrantType `schema:"grant_type"`
}

func NewJWTProfileRequest added in v0.12.0

func NewJWTProfileRequest(assertion string, scopes ...string) *JWTProfileRequest

ClientCredentialsGrantBasic creates an oauth2 `Client Credentials` Grant sneding client_id and client_secret as basic auth header

type TokenExchangeOption

type TokenExchangeOption func(*TokenExchangeRequest)

func WithGrantType

func WithGrantType(grantType string) TokenExchangeOption

type TokenExchangeRequest

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

func NewTokenExchangeRequest

func NewTokenExchangeRequest(subjectToken, subjectTokenType string, opts ...TokenExchangeOption) *TokenExchangeRequest

Jump to

Keyboard shortcuts

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