Skip to content

Commit

Permalink
In-URL accessor for auth/token/lookup-accessor endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnayak committed Mar 9, 2016
1 parent 64bc542 commit b8bd534
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vault/token_store.go
Expand Up @@ -132,7 +132,7 @@ func NewTokenStore(c *Core, config *logical.BackendConfig) (*TokenStore, error)
},

&framework.Path{
Pattern: "lookup-accessor$",
Pattern: "lookup-accessor/(?P<accessor>.+)",

Fields: map[string]*framework.FieldSchema{
"accessor": &framework.FieldSchema{
Expand Down
3 changes: 1 addition & 2 deletions vault/token_store_test.go
Expand Up @@ -58,8 +58,7 @@ func TestTokenStore_HandleRequest_LookupAccessor(t *testing.T) {
t.Fatalf("err: %s", err)
}

req := logical.TestRequest(t, logical.UpdateOperation, "lookup-accessor")
req.Data["accessor"] = out.Accessor
req := logical.TestRequest(t, logical.UpdateOperation, "lookup-accessor/"+out.Accessor)

resp, err := ts.HandleRequest(req)
if err != nil {
Expand Down

0 comments on commit b8bd534

Please sign in to comment.