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
|
@ -14,7 +14,7 @@ type clientCredentialsGrant struct {
|
|||
}
|
||||
|
||||
//ClientCredentialsGrantBasic creates an oauth2 `Client Credentials` Grant
|
||||
//sneding client_id and client_secret as basic auth header
|
||||
//sending client_id and client_secret as basic auth header
|
||||
func ClientCredentialsGrantBasic(scopes ...string) *clientCredentialsGrantBasic {
|
||||
return &clientCredentialsGrantBasic{
|
||||
grantType: "client_credentials",
|
||||
|
@ -23,7 +23,7 @@ func ClientCredentialsGrantBasic(scopes ...string) *clientCredentialsGrantBasic
|
|||
}
|
||||
|
||||
//ClientCredentialsGrantValues creates an oauth2 `Client Credentials` Grant
|
||||
//sneding client_id and client_secret as form values
|
||||
//sending client_id and client_secret as form values
|
||||
func ClientCredentialsGrantValues(clientID, clientSecret string, scopes ...string) *clientCredentialsGrant {
|
||||
return &clientCredentialsGrant{
|
||||
clientCredentialsGrantBasic: ClientCredentialsGrantBasic(scopes...),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue