feat(op): implemented support for client_credentials grant (#172)
* implemented support for client_credentials grant * first draft * Update pkg/op/token_client_credentials.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * updated placeholder interface name * updated import paths * ran mockgen Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
parent
550f7877f2
commit
86fd502434
12 changed files with 164 additions and 6 deletions
|
@ -15,6 +15,9 @@ const (
|
|||
//GrantTypeRefreshToken defines the grant_type `refresh_token` used for the Token Request in the Refresh Token Flow
|
||||
GrantTypeRefreshToken GrantType = "refresh_token"
|
||||
|
||||
//GrantTypeClientCredentials defines the grant_type `client_credentials` used for the Token Request in the Client Credentials Token Flow
|
||||
GrantTypeClientCredentials GrantType = "client_credentials"
|
||||
|
||||
//GrantTypeBearer defines the grant_type `urn:ietf:params:oauth:grant-type:jwt-bearer` used for the JWT Authorization Grant
|
||||
GrantTypeBearer GrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer"
|
||||
|
||||
|
@ -198,3 +201,10 @@ type TokenExchangeRequest struct {
|
|||
Scope SpaceDelimitedArray `schema:"scope"`
|
||||
requestedTokenType string `schema:"requested_token_type"`
|
||||
}
|
||||
|
||||
type ClientCredentialsRequest struct {
|
||||
GrantType GrantType `schema:"grant_type"`
|
||||
Scope SpaceDelimitedArray `schema:"scope"`
|
||||
ClientID string `schema:"client_id"`
|
||||
ClientSecret string `schema:"client_secret"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue