Documentation ¶
Index ¶
- Constants
- func WithActorToken(token, tokenType string) func(*TokenExchangeRequest)
- func WithAudience(audience []string) func(*TokenExchangeRequest)
- func WithRequestedTokenType(tokenType string) func(*TokenExchangeRequest)
- func WithResource(resource []string) func(*TokenExchangeRequest)
- func WithScope(scope []string) func(*TokenExchangeRequest)
- type JWTProfileRequest
- type TokenExchangeOption
- type TokenExchangeRequest
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
Click to show internal directories.
Click to hide internal directories.