Replace auth account.Namespace with account.Scopes

This commit is contained in:
Ben Toogood
2020-05-19 18:17:17 +01:00
parent e61edf6280
commit dc10f88c12
17 changed files with 1108 additions and 1254 deletions

View File

@@ -49,11 +49,11 @@ func (n *noop) Generate(id string, opts ...GenerateOption) (*Account, error) {
options := NewGenerateOptions(opts...)
return &Account{
ID: id,
Roles: options.Roles,
Secret: options.Secret,
Metadata: options.Metadata,
Namespace: DefaultNamespace,
ID: id,
Roles: options.Roles,
Secret: options.Secret,
Metadata: options.Metadata,
Scopes: options.Scopes,
}, nil
}
@@ -74,10 +74,7 @@ func (n *noop) Verify(acc *Account, res *Resource) error {
// Inspect a token
func (n *noop) Inspect(token string) (*Account, error) {
return &Account{
ID: uuid.New().String(),
Namespace: DefaultNamespace,
}, nil
return &Account{ID: uuid.New().String()}, nil
}
// Token generation using an account id and secret