Skip to content

Commit

Permalink
feat: support OpenID Connect's response_mode=form_post
Browse files Browse the repository at this point in the history
This patch adds support for the `response_mode` parameter as defined in [OAuth 2.0 Form Post Response Mode](https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html). Additionally, values `fragment` and `query` are supported as defined in [OAuth 2.0 Multiple Response Type Encoding Practices](https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html).

Closes #1621
  • Loading branch information
aeneasr committed Nov 10, 2020
1 parent f1c28e4 commit 3b177c1
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 13 deletions.
9 changes: 9 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,15 @@ func (c *Client) GetResponseTypes() fosite.Arguments {
return fosite.Arguments(c.ResponseTypes)
}

func (c *Client) GetResponseModes() []fosite.ResponseModeType {
return []fosite.ResponseModeType{
fosite.ResponseModeDefault,
fosite.ResponseModeFormPost,
fosite.ResponseModeQuery,
fosite.ResponseModeFragment,
}
}

func (c *Client) GetOwner() string {
return c.Owner
}
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ module github.com/ory/hydra

go 1.15

//replace github.com/ory/fosite => ../fosite

replace github.com/ory/fosite => github.com/ory/fosite v0.35.2-0.20201109171311-3731efd11b93

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/go-bindata/go-bindata v3.1.1+incompatible
Expand Down Expand Up @@ -37,7 +41,7 @@ require (
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.9.1
github.com/ory/viper v1.7.5
github.com/ory/x v0.0.153
github.com/ory/x v0.0.163
github.com/pborman/uuid v1.2.0
github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5
github.com/pkg/errors v0.9.1
Expand Down
Loading

0 comments on commit 3b177c1

Please sign in to comment.