mirror of
https://github.com/rancher/types.git
synced 2025-07-16 06:25:50 +00:00
Add changes for auth refresh
This commit is contained in:
parent
c0e0d4dd2b
commit
c50d24d4b9
@ -25,6 +25,7 @@ type Token struct {
|
||||
Expired bool `json:"expired"`
|
||||
ExpiresAt string `json:"expiresAt"`
|
||||
Current bool `json:"current"`
|
||||
Enabled *bool `json:"enabled,omitempty" norman:"default=true"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
@ -71,6 +72,8 @@ type UserAttribute struct {
|
||||
|
||||
UserName string
|
||||
GroupPrincipals map[string]Principals // the value is a []Principal, but code generator cannot handle slice as a value
|
||||
LastRefresh string
|
||||
NeedsRefresh bool
|
||||
}
|
||||
|
||||
type Principals struct {
|
||||
|
@ -11,7 +11,7 @@ type Manager interface {
|
||||
GetUser(apiContext *types.APIContext) string
|
||||
EnsureToken(tokenName, description, userName string) (string, error)
|
||||
EnsureUser(principalName, displayName string) (*v3.User, error)
|
||||
CheckAccess(accessMode string, allowedPrincipalIDs []string, user v3.Principal, groups []v3.Principal) (bool, error)
|
||||
CheckAccess(accessMode string, allowedPrincipalIDs []string, userPrincipalID string, groups []v3.Principal) (bool, error)
|
||||
SetPrincipalOnCurrentUserByUserID(userID string, principal v3.Principal) (*v3.User, error)
|
||||
CreateNewUserClusterRoleBinding(userName string, userUID apitypes.UID) error
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user