From 385d5c15dab8953bacb94fbc894728edc0c3cbdc Mon Sep 17 00:00:00 2001 From: David Sharnoff Date: Wed, 29 Jun 2022 02:39:32 -0700 Subject: [PATCH] define GrantType constants in one place (#189) --- pkg/oidc/discovery.go | 4 ---- pkg/oidc/token_request.go | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/oidc/discovery.go b/pkg/oidc/discovery.go index 1a92f8d..673d628 100644 --- a/pkg/oidc/discovery.go +++ b/pkg/oidc/discovery.go @@ -157,7 +157,3 @@ const ( AuthMethodNone AuthMethod = "none" AuthMethodPrivateKeyJWT AuthMethod = "private_key_jwt" ) - -const ( - GrantTypeImplicit GrantType = "implicit" -) diff --git a/pkg/oidc/token_request.go b/pkg/oidc/token_request.go index c5396da..56c4f1c 100644 --- a/pkg/oidc/token_request.go +++ b/pkg/oidc/token_request.go @@ -24,6 +24,9 @@ const ( //GrantTypeTokenExchange defines the grant_type `urn:ietf:params:oauth:grant-type:token-exchange` used for the OAuth Token Exchange Grant GrantTypeTokenExchange GrantType = "urn:ietf:params:oauth:grant-type:token-exchange" + //GrantTypeImplicit defines the grant type `implicit` used for implicit flows that skip the generation and exchange of an Authorization Code + GrantTypeImplicit GrantType = "implicit" + //ClientAssertionTypeJWTAssertion defines the client_assertion_type `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` //used for the OAuth JWT Profile Client Authentication ClientAssertionTypeJWTAssertion = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"