Skip to content

Commit

Permalink
oauth2: remove unused implicit grant storage (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas committed May 26, 2017
1 parent 851fea5 commit 8acf0f9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ If you wish to compile ORY Hydra yourself, you need to install and set up [Go 1.
to your `$PATH`. To do so, run the following commands in a shell (bash, sh, cmd.exe, ...):

```
go get github.com/ory/hydra
go get -d github.com/ory/hydra
go get github.com/Masterminds/glide
cd $GOPATH/src/github.com/ory/hydra
glide install
Expand Down Expand Up @@ -235,7 +235,7 @@ Run `hydra -h` or `hydra help`.
Developing with ORY Hydra is as easy as:

```
go get github.com/ory/hydra
go get -d github.com/ory/hydra
go get github.com/Masterminds/glide
cd $GOPATH/src/github.com/ory/hydra
glide install
Expand Down
25 changes: 0 additions & 25 deletions oauth2/fosite_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,6 @@ var defaultRequest = fosite.Request{
Session: &fosite.DefaultSession{Subject: "bar"},
}

func TestCreateImplicitAccessTokenSession(t *testing.T) {
ctx := context.Background()
for k, m := range clientManagers {
t.Run(fmt.Sprintf("case=%s", k), func(t *testing.T) {

_, err := m.GetAccessTokenSession(ctx, "implicit-4321", &fosite.DefaultSession{})
assert.NotNil(t, err)

err = m.CreateImplicitAccessTokenSession(ctx, "implicit-4321", &defaultRequest)
assert.Nil(t, err)

res, err := m.GetAccessTokenSession(ctx, "implicit-4321", &fosite.DefaultSession{})
require.Nil(t, err)
c.AssertObjectKeysEqual(t, &defaultRequest, res, "Scopes", "GrantedScopes", "Form", "Session")

err = m.DeleteAccessTokenSession(ctx, "implicit-4321")
assert.Nil(t, err)

time.Sleep(100 * time.Millisecond)

_, err = m.GetAccessTokenSession(ctx, "implicit-4321", &fosite.DefaultSession{})
assert.NotNil(t, err)
})
}
}
func TestCreateGetDeleteAuthorizeCodes(t *testing.T) {
ctx := context.Background()
for k, m := range clientManagers {
Expand Down
1 change: 0 additions & 1 deletion pkg/fosite_storer.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type FositeStorer interface {
fosite.Storage
oauth2.AuthorizeCodeGrantStorage
oauth2.RefreshTokenGrantStorage
oauth2.ImplicitGrantStorage
openid.OpenIDConnectRequestStorage

RevokeRefreshToken(ctx context.Context, requestID string) error
Expand Down

0 comments on commit 8acf0f9

Please sign in to comment.