Skip to content

Commit

Permalink
feat: clean up openid table
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jul 9, 2024
1 parent a9d0299 commit b46b256
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion access_request_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (f *Fosite) NewAccessRequest(ctx context.Context, r *http.Request, session

if r.Method != "POST" {
return accessRequest, errorsx.WithStack(ErrInvalidRequest.WithHintf("HTTP method is '%s', expected 'POST'.", r.Method))
} else if err := r.ParseMultipartForm(1 << 20); err != nil && err != http.ErrNotMultipart {
} else if err := r.ParseMultipartForm(1 << 20); err != nil && !errors.Is(err, http.ErrNotMultipart) {
return accessRequest, errorsx.WithStack(ErrInvalidRequest.WithHint("Unable to parse HTTP body, make sure to send a properly formatted form request body.").WithWrap(err).WithDebug(err.Error()))
} else if len(r.PostForm) == 0 {
return accessRequest, errorsx.WithStack(ErrInvalidRequest.WithHint("The POST body can not be empty."))
Expand Down
15 changes: 8 additions & 7 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ import (

// Request is an implementation of Requester
type Request struct {
ID string `json:"id" gorethink:"id"`
RequestedAt time.Time `json:"requestedAt" gorethink:"requestedAt"`
Client Client `json:"client" gorethink:"client"`
RequestedScope Arguments `json:"scopes" gorethink:"scopes"`
GrantedScope Arguments `json:"grantedScopes" gorethink:"grantedScopes"`
Form url.Values `json:"form" gorethink:"form"`
Session Session `json:"session" gorethink:"session"`
ID string `json:"id"`
RequestedAt time.Time `json:"requestedAt"`
ExpiresAt time.Time `json:"expiresAt"`
Client Client `json:"client"`
RequestedScope Arguments `json:"scopes"`
GrantedScope Arguments `json:"grantedScopes"`
Form url.Values `json:"form"`
Session Session `json:"session"`
RequestedAudience Arguments `json:"requestedAudience"`
GrantedAudience Arguments `json:"grantedAudience"`
Lang language.Tag `json:"-"`
Expand Down

0 comments on commit b46b256

Please sign in to comment.