Default auth, return account secret on Inspect (#1430)

Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
ben-toogood 2020-03-27 09:54:29 +00:00 committed by GitHub
parent 47c7181d41
commit 6723d17b22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,6 +41,7 @@ func (n *noop) Generate(id string, opts ...GenerateOption) (*Account, error) {
ID: id, ID: id,
Roles: options.Roles, Roles: options.Roles,
Metadata: options.Metadata, Metadata: options.Metadata,
Secret: &Token{},
}, nil }, nil
} }
@ -62,8 +63,7 @@ func (n *noop) Verify(acc *Account, res *Resource) error {
// Inspect a token // Inspect a token
func (n *noop) Inspect(token string) (*Account, error) { func (n *noop) Inspect(token string) (*Account, error) {
return &Account{ return &Account{
ID: uuid.New().String(), ID: uuid.New().String(),
Secret: &Token{},
}, nil }, nil
} }