Skip to content

Commit 67be8ae

Browse files
committed
feat(server): allow using client_id & secret from basic auth header in token endpoint
1 parent f9d2130 commit 67be8ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/handlers/token.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ func TokenHandler() gin.HandlerFunc {
6464
})
6565
}
6666

67+
// check if clientID & clientSecret are present as part of
68+
// authorization header with basic auth
69+
if clientID == "" && clientSecret == "" && codeVerifier == "" {
70+
clientID, clientSecret, _ = gc.Request.BasicAuth()
71+
}
72+
6773
if clientID == "" {
6874
log.Debug("Client ID is empty")
6975
gc.JSON(http.StatusBadRequest, gin.H{

0 commit comments

Comments
 (0)