Add system scope v3 token support
Related-To: PRODX-23695
Change-Id: I8fe720f34765785f385225132fde669d0bf10d73
diff --git a/auth_options.go b/auth_options.go
index eabf182..eaf4b68 100644
--- a/auth_options.go
+++ b/auth_options.go
@@ -59,6 +59,8 @@
// TokenID allows users to authenticate (possibly as another user) with an
// authentication token ID.
TokenID string `json:"-"`
+
+ SystemScope bool `json:"-"`
}
// ToTokenV2CreateMap allows AuthOptions to satisfy the AuthOptionsBuilder
@@ -259,6 +261,14 @@
}
}
+ if opts.SystemScope {
+ return map[string]interface{}{
+ "system": map[string]interface{}{
+ "all": true,
+ },
+ }, nil
+ }
+
if scope.ProjectName != "" {
// ProjectName provided: either DomainID or DomainName must also be supplied.
// ProjectID may not be supplied.