Skip to content

Commit

Permalink
Merge branch 'master' into fix-371
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeneas Rekkas (arekkas) committed Jun 5, 2017
2 parents ee1c5ac + a9f500b commit 4eee0b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions oauth2/handler.go
Expand Up @@ -226,6 +226,7 @@ func (h *Handler) IntrospectHandler(w http.ResponseWriter, r *http.Request, _ ht
Username: resp.GetAccessRequester().GetSession().GetUsername(),
Extra: resp.GetAccessRequester().GetSession().(*Session).Extra,
Audience: resp.GetAccessRequester().GetClient().GetID(),
Issuer: h.Issuer,
})
if err != nil {
pkg.LogError(err, h.L)
Expand Down
2 changes: 2 additions & 0 deletions oauth2/introspector_test.go
Expand Up @@ -47,6 +47,7 @@ func init() {
compose.OAuth2TokenIntrospectionFactory,
),
H: herodot.NewJSONWriter(nil),
Issuer: "foobariss",
}
serv.SetRoutes(r)
ts = httptest.NewServer(r)
Expand Down Expand Up @@ -125,6 +126,7 @@ func TestIntrospect(t *testing.T) {
//assert.Equal(t, "tests", c.Issuer)
assert.Equal(t, now.Add(time.Hour).Unix(), c.ExpiresAt, "expires at")
assert.Equal(t, now.Unix(), c.IssuedAt, "issued at")
assert.Equal(t, "foobariss", c.Issuer, "issuer")
assert.Equal(t, map[string]interface{}{"foo": "bar"}, c.Extra)
},
},
Expand Down

0 comments on commit 4eee0b0

Please sign in to comment.