🐛 Fixed invalid CodeChallengeMethod parsing
This commit is contained in:
parent
83b3b21c6b
commit
b87660d78f
|
@ -166,7 +166,7 @@ func (h *Handler) handleAuthorize(w http.ResponseWriter, r *http.Request) {
|
||||||
Client: client,
|
Client: client,
|
||||||
Me: &req.Me,
|
Me: &req.Me,
|
||||||
RedirectURI: &req.RedirectURI,
|
RedirectURI: &req.RedirectURI,
|
||||||
CodeChallengeMethod: *req.CodeChallengeMethod,
|
CodeChallengeMethod: req.CodeChallengeMethod,
|
||||||
ResponseType: req.ResponseType,
|
ResponseType: req.ResponseType,
|
||||||
CodeChallenge: req.CodeChallenge,
|
CodeChallenge: req.CodeChallenge,
|
||||||
State: req.State,
|
State: req.State,
|
||||||
|
@ -207,7 +207,7 @@ func (h *Handler) handleVerify(w http.ResponseWriter, r *http.Request) {
|
||||||
ClientID: req.ClientID,
|
ClientID: req.ClientID,
|
||||||
Me: req.Me,
|
Me: req.Me,
|
||||||
RedirectURI: req.RedirectURI.URL,
|
RedirectURI: req.RedirectURI.URL,
|
||||||
CodeChallengeMethod: *req.CodeChallengeMethod,
|
CodeChallengeMethod: req.CodeChallengeMethod,
|
||||||
Scope: req.Scope,
|
Scope: req.Scope,
|
||||||
CodeChallenge: req.CodeChallenge,
|
CodeChallenge: req.CodeChallenge,
|
||||||
})
|
})
|
||||||
|
|
|
@ -22,7 +22,7 @@ type (
|
||||||
Me domain.Me `form:"me"`
|
Me domain.Me `form:"me"`
|
||||||
|
|
||||||
// The hashing method used to calculate the code challenge.
|
// The hashing method used to calculate the code challenge.
|
||||||
CodeChallengeMethod *domain.CodeChallengeMethod `form:"code_challenge_method,omitempty"`
|
CodeChallengeMethod domain.CodeChallengeMethod `form:"code_challenge_method,omitempty"`
|
||||||
|
|
||||||
// Indicates to the authorization server that an authorization
|
// Indicates to the authorization server that an authorization
|
||||||
// code should be returned as the response.
|
// code should be returned as the response.
|
||||||
|
@ -46,16 +46,16 @@ type (
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthVerifyRequest struct {
|
AuthVerifyRequest struct {
|
||||||
ClientID domain.ClientID `form:"client_id"`
|
ClientID domain.ClientID `form:"client_id"`
|
||||||
Me domain.Me `form:"me"`
|
Me domain.Me `form:"me"`
|
||||||
RedirectURI domain.URL `form:"redirect_uri"`
|
RedirectURI domain.URL `form:"redirect_uri"`
|
||||||
CodeChallengeMethod *domain.CodeChallengeMethod `form:"code_challenge_method,omitempty"`
|
CodeChallengeMethod domain.CodeChallengeMethod `form:"code_challenge_method,omitempty"`
|
||||||
ResponseType domain.ResponseType `form:"response_type"`
|
ResponseType domain.ResponseType `form:"response_type"`
|
||||||
Authorize string `form:"authorize"`
|
Authorize string `form:"authorize"`
|
||||||
CodeChallenge string `form:"code_challenge,omitempty"`
|
CodeChallenge string `form:"code_challenge,omitempty"`
|
||||||
State string `form:"state"`
|
State string `form:"state"`
|
||||||
Provider string `form:"provider"`
|
Provider string `form:"provider"`
|
||||||
Scope domain.Scopes `form:"scope[],omitempty"`
|
Scope domain.Scopes `form:"scope[],omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthExchangeRequest struct {
|
AuthExchangeRequest struct {
|
||||||
|
@ -95,7 +95,7 @@ func NewAuthAuthorizationRequest() *AuthAuthorizationRequest {
|
||||||
return &AuthAuthorizationRequest{
|
return &AuthAuthorizationRequest{
|
||||||
ClientID: domain.ClientID{},
|
ClientID: domain.ClientID{},
|
||||||
CodeChallenge: "",
|
CodeChallenge: "",
|
||||||
CodeChallengeMethod: &domain.CodeChallengeMethodUnd,
|
CodeChallengeMethod: domain.CodeChallengeMethodUnd,
|
||||||
Me: domain.Me{},
|
Me: domain.Me{},
|
||||||
RedirectURI: domain.URL{},
|
RedirectURI: domain.URL{},
|
||||||
ResponseType: domain.ResponseTypeUnd,
|
ResponseType: domain.ResponseTypeUnd,
|
||||||
|
@ -129,7 +129,7 @@ func NewAuthVerifyRequest() *AuthVerifyRequest {
|
||||||
Authorize: "",
|
Authorize: "",
|
||||||
ClientID: domain.ClientID{},
|
ClientID: domain.ClientID{},
|
||||||
CodeChallenge: "",
|
CodeChallenge: "",
|
||||||
CodeChallengeMethod: &domain.CodeChallengeMethodUnd,
|
CodeChallengeMethod: domain.CodeChallengeMethodUnd,
|
||||||
Me: domain.Me{},
|
Me: domain.Me{},
|
||||||
Provider: "",
|
Provider: "",
|
||||||
RedirectURI: domain.URL{},
|
RedirectURI: domain.URL{},
|
||||||
|
|
Loading…
Reference in New Issue