Skip to content

Commit

Permalink
refactor: Use constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Nov 23, 2020
1 parent 1fcb789 commit d681bd9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions authorize_request_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,7 @@ func (f *Fosite) validateResponseTypes(r *http.Request, request *AuthorizeReques
}

func (f *Fosite) NewAuthorizeRequest(ctx context.Context, r *http.Request) (AuthorizeRequester, error) {
request := &AuthorizeRequest{
ResponseTypes: Arguments{},
HandledResponseTypes: Arguments{},
Request: *NewRequest(),
}
request := NewAuthorizeRequest()

if err := r.ParseMultipartForm(1 << 20); err != nil && err != http.ErrNotMultipart {
return request, errors.WithStack(ErrInvalidRequest.WithHint("Unable to parse HTTP body, make sure to send a properly formatted form request body.").WithCause(err).WithDebug(err.Error()))
Expand Down

0 comments on commit d681bd9

Please sign in to comment.