Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth2: remove unused implicit grant storage #469

Merged
merged 4 commits into from
May 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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