Skip to content

Commit

Permalink
fix response type validation
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed May 8, 2024
1 parent 2abd532 commit 396afc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router/oauth2/authorization_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (h *Handler) AuthorizationEndpointHandler(c echo.Context) error {
}

switch {
case types.Code && !types.Token: // "code" 現状はcodeしかサポートしない
case types.Code && !types.Token && !types.IDToken: // 現状は Authorization Code Flow しかサポートしない
if se == nil {
// 未ログインの場合はログインしてから再度叩かせる
current := c.Request().URL
Expand Down Expand Up @@ -353,7 +353,7 @@ func (h *Handler) AuthorizationDecideHandler(c echo.Context) error {
}

switch {
case reqAuth.Types.Code && !reqAuth.Types.Token: // "code" 現状はcodeしかサポートしない
case reqAuth.Types.Code && !reqAuth.Types.Token && !reqAuth.Types.IDToken: // 現状は Authorization Code Flow しかサポートしない
data := &model.OAuth2Authorize{
Code: random.SecureAlphaNumeric(36),
ClientID: reqAuth.ClientID,
Expand Down

0 comments on commit 396afc1

Please sign in to comment.