Skip to content

Commit

Permalink
server: instantiate token introspection
Browse files Browse the repository at this point in the history
Aeneas Rekkas (arekkas) committed Aug 17, 2016
1 parent 4b24be4 commit 56a9eda
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/server/handler_oauth2_factory.go
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ import (
"github.com/ory-am/hydra/pkg"
"golang.org/x/net/context"
r "gopkg.in/dancannon/gorethink.v2"
"github.com/ory-am/hydra/herodot"
)

func injectFositeStore(c *config.Config, clients client.Manager) {
@@ -122,6 +123,7 @@ func newOAuth2Handler(c *config.Config, router *httprouter.Router, km jwk.Manage
consentURL, err := url.Parse(c.ConsentURL)
pkg.Must(err, "Could not parse consent url %s.", c.ConsentURL)

ctx := c.Context()
handler := &oauth2.Handler{
ForcedHTTP: c.ForceHTTP,
OAuth2: o,
@@ -132,6 +134,14 @@ func newOAuth2Handler(c *config.Config, router *httprouter.Router, km jwk.Manage
DefaultIDTokenLifespan: c.GetIDTokenLifespan(),
},
ConsentURL: *consentURL,
Introspector: &oauth2.LocalIntrospector{
OAuth2: o,
AccessTokenLifespan: c.GetAccessTokenLifespan(),
Issuer : c.Issuer,

},
Firewall: ctx.Warden,
H: &herodot.JSON{},
}

handler.SetRoutes(router)

0 comments on commit 56a9eda

Please sign in to comment.