1
0
mirror of https://github.com/rancher/types.git synced 2025-09-01 21:32:10 +00:00

Add systems token interface

This commit is contained in:
rmweir
2021-01-04 21:51:08 -07:00
parent 72359190db
commit 048d281ee0
3 changed files with 13 additions and 2 deletions

View File

@@ -9,8 +9,9 @@ import (
type Manager interface {
SetPrincipalOnCurrentUser(apiContext *types.APIContext, principal v3.Principal) (*v3.User, error)
GetUser(apiContext *types.APIContext) string
EnsureToken(tokenName, description, kind, userName string) (string, error)
EnsureClusterToken(clusterName, tokenName, description, kind, userName string) (string, error)
EnsureToken(tokenName, description, kind, userName string, ttl *int64, randomize bool) (string, error)
EnsureClusterToken(clusterName, tokenName, description, kind, userName string, ttl *int64, randomize bool) (string, error)
DeleteToken(tokenName string) error
EnsureUser(principalName, displayName string) (*v3.User, error)
CheckAccess(accessMode string, allowedPrincipalIDs []string, userPrincipalID string, groups []v3.Principal) (bool, error)
SetPrincipalOnCurrentUserByUserID(userID string, principal v3.Principal) (*v3.User, error)