Skip to content
Snippets Groups Projects
Verified Commit deb0578f authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

fix grant_type & response_type parameter ignored

parent bfb352cf
No related branches found
No related tags found
No related merge requests found
Pipeline #323223 passed
......@@ -22,6 +22,9 @@ type GeneralMytokenRequest struct {
// NewGeneralMytokenRequest creates a GeneralMytokenRequest with default values
func NewGeneralMytokenRequest() *GeneralMytokenRequest {
return &GeneralMytokenRequest{
GeneralMytokenRequest: api.GeneralMytokenRequest{
ResponseType: api.ResponseTypeToken,
},
ResponseType: model.ResponseTypeToken,
GrantType: -1,
}
......@@ -43,5 +46,7 @@ func (r *GeneralMytokenRequest) UnmarshalJSON(bytes []byte) error {
if len(r.Capabilities.Capabilities) == 0 {
r.Capabilities.Capabilities = api.DefaultCapabilities
}
r.ResponseType = model.NewResponseType(p.ResponseType)
r.GrantType = model.NewGrantType(p.GrantType)
return nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment