Documentation ¶
Index ¶
- type CertExchangeInfo
- type ClientCredentials
- type Token
- func DoCertExchange(ctx context.Context, tokenEndpoint string, exchangeInfo CertExchangeInfo, ...) (*Token, error)
- func DoTokenExchange(ctx context.Context, client *http.Client, tokenEndpoint string, ...) (*Token, error)
- func GetAccessToken(client *http.Client, tokenEndpoint string, scopes []string, ...) (*Token, error)
- type TokenExchangeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertExchangeInfo ¶
type ClientCredentials ¶
type ClientCredentials struct { ClientAuth interface{} // the supported types for this are a JWK (implying jwt-bearer auth) or a string (implying client secret auth) ClientID string }
type Token ¶
type Token struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int64 `json:"expires_in,omitempty"` Scope string `json:"scope,omitempty"` // contains filtered or unexported fields }
func DoCertExchange ¶
func DoCertExchange(ctx context.Context, tokenEndpoint string, exchangeInfo CertExchangeInfo, clientCredentials ClientCredentials, key jwk.Key) (*Token, error)
func DoTokenExchange ¶
func GetAccessToken ¶
func GetAccessToken(client *http.Client, tokenEndpoint string, scopes []string, clientCredentials ClientCredentials, dpopPrivateKey jwk.Key) (*Token, error)
GetAccessToken this misses the flow where the Authorization server can tell us the next nonce to use. missing this flow costs us a bit in efficiency (a round trip per access token) but this is still correct because
type TokenExchangeInfo ¶
Click to show internal directories.
Click to hide internal directories.