Add Namespace to Auth (#1438)

Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
ben-toogood
2020-03-30 09:51:37 +01:00
committed by GitHub
parent 3d7d5ce6b4
commit 4db2f5e79d
8 changed files with 120 additions and 64 deletions

View File

@@ -68,6 +68,8 @@ type Account struct {
Roles []string `json:"roles"`
// Any other associated metadata
Metadata map[string]string `json:"metadata"`
// Namespace the account belongs to, default blank
Namespace string `json:"namespace"`
}
// Token can be short or long lived
@@ -86,6 +88,8 @@ type Token struct {
Roles []string `json:"roles"`
// Metadata embedded in the token
Metadata map[string]string `json:"metadata"`
// Namespace the token belongs to
Namespace string `json:"namespace"`
}
const (