We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7bf47c commit 3e2e084Copy full SHA for 3e2e084
internal/clientcredentials/service.go
@@ -87,6 +87,11 @@ func HandleTokenRequest(w http.ResponseWriter, r *http.Request) {
87
return
88
}
89
90
+ tokenType := r.URL.Query().Get("token_type")
91
+ if tokenType == "" {
92
+ tokenType = "Bearer" // default
93
+ }
94
+
95
accessToken := firstAccessToken
96
97
_, ok := state.Load(clientSecret)
@@ -106,7 +111,7 @@ func HandleTokenRequest(w http.ResponseWriter, r *http.Request) {
106
111
107
112
response := tokenResponse{
108
113
AccessToken: accessToken,
109
- TokenType: "Bearer",
114
+ TokenType: tokenType,
110
115
ExpiresIn: 0,
116
117
0 commit comments