From 0c4d5960a90eac188228b520848579e2aa77f4c9 Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Wed, 9 Mar 2016 14:54:52 -0500 Subject: [PATCH] In-URL accessor for auth/token/lookup-accessor endpoint --- vault/token_store.go | 2 +- vault/token_store_test.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vault/token_store.go b/vault/token_store.go index 21824f223..c39a608c9 100644 --- a/vault/token_store.go +++ b/vault/token_store.go @@ -132,7 +132,7 @@ func NewTokenStore(c *Core, config *logical.BackendConfig) (*TokenStore, error) }, &framework.Path{ - Pattern: "lookup-accessor$", + Pattern: "lookup-accessor/(?P.+)", Fields: map[string]*framework.FieldSchema{ "accessor": &framework.FieldSchema{ diff --git a/vault/token_store_test.go b/vault/token_store_test.go index e2500873b..00555de34 100644 --- a/vault/token_store_test.go +++ b/vault/token_store_test.go @@ -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 {