In-URL accessor for auth/token/lookup-accessor endpoint

This commit is contained in:
vishalnayak 2016-03-09 14:54:52 -05:00
parent 2528ffbc18
commit 0c4d5960a9
2 changed files with 2 additions and 3 deletions

View File

@ -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{

View File

@ -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 {