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

token hashing

This commit is contained in:
Caleb Bron
2020-02-20 16:03:51 -07:00
parent b2b94dc65a
commit c428098012
3 changed files with 12 additions and 2 deletions

View File

@@ -9,8 +9,8 @@ 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) (string, error)
EnsureClusterToken(clusterName, tokenName, description, kind, userName string, ttl *int64) (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)