Versions in this module Expand all Collapse all v1 v1.12.4 Dec 13, 2022 v1.12.3 Dec 13, 2022 Changes in this version + const Production + const Staging + func IdentityCaveats(url string) []checkers.Caveat + func IdentityUserIDCaveats(url string) []checkers.Caveat + func LoginMethods(client *http.Client, u *url.URL) (*params.LoginMethods, error) + func StripDomain(candidClient *Client, domain string) identchecker.IdentityClient + func UserDeclaration(username string) checkers.Caveat + func UserIDDeclaration(id string) checkers.Caveat + type Client struct + func New(p NewParams) (*Client, error) + func (c *Client) CacheEvict(username string) + func (c *Client) CacheEvictAll() + func (c *Client) ClearUserMFACredentials(ctx context.Context, p *params.ClearUserMFACredentialsRequest) error + func (c *Client) CreateAgent(ctx context.Context, p *params.CreateAgentRequest) (*params.CreateAgentResponse, error) + func (c *Client) DeclaredIdentity(ctx context.Context, declared map[string]string) (identchecker.Identity, error) + func (c *Client) DeleteSSHKeys(ctx context.Context, p *params.DeleteSSHKeysRequest) error + func (c *Client) DischargeTokenForUser(ctx context.Context, p *params.DischargeTokenForUserRequest) (params.DischargeTokenForUserResponse, error) + func (c *Client) GetSSHKeys(ctx context.Context, p *params.SSHKeysRequest) (params.SSHKeysResponse, error) + func (c *Client) GetUserGroupsWithID(ctx context.Context, p *params.GetUserGroupsWithIDRequest) (*params.GroupsResponse, error) + func (c *Client) GetUserWithID(ctx context.Context, p *params.GetUserWithIDRequest) (*params.User, error) + func (c *Client) IdentityFromContext(ctx context.Context) (identchecker.Identity, []checkers.Caveat, error) + func (c *Client) ModifyUserGroups(ctx context.Context, p *params.ModifyUserGroupsRequest) error + func (c *Client) PutSSHKeys(ctx context.Context, p *params.PutSSHKeysRequest) error + func (c *Client) QueryUsers(ctx context.Context, p *params.QueryUsersRequest) ([]string, error) + func (c *Client) SetUserDeprecated(ctx context.Context, p *params.SetUserRequest) error + func (c *Client) SetUserExtraInfo(ctx context.Context, p *params.SetUserExtraInfoRequest) error + func (c *Client) SetUserExtraInfoItem(ctx context.Context, p *params.SetUserExtraInfoItemRequest) error + func (c *Client) SetUserGroups(ctx context.Context, p *params.SetUserGroupsRequest) error + func (c *Client) User(ctx context.Context, p *params.UserRequest) (*params.User, error) + func (c *Client) UserExtraInfo(ctx context.Context, p *params.UserExtraInfoRequest) (map[string]interface{}, error) + func (c *Client) UserExtraInfoItem(ctx context.Context, p *params.UserExtraInfoItemRequest) (interface{}, error) + func (c *Client) UserGroups(ctx context.Context, p *params.UserGroupsRequest) ([]string, error) + func (c *Client) UserIDPGroups(ctx context.Context, p *params.UserIDPGroupsRequest) ([]string, error) + func (c *Client) UserToken(ctx context.Context, p *params.UserTokenRequest) (*bakery.Macaroon, error) + func (c *Client) VerifyToken(ctx context.Context, p *params.VerifyTokenRequest) (map[string]string, error) + func (c *Client) WhoAmI(ctx context.Context, p *params.WhoAmIRequest) (params.WhoAmIResponse, error) + type GroupCache struct + func NewGroupCache(c *Client, cacheTime time.Duration) *GroupCache + func (c *GroupCache) CacheEvict(username string) + func (c *GroupCache) CacheEvictAll() + func (gc *GroupCache) Groups(username string) ([]string, error) + type Identity interface + Groups func() ([]string, error) + Username func() (string, error) + type NewParams struct + AgentUsername string + BaseURL string + CacheTime time.Duration + Client *httpbakery.Client + UseUserID bool + type PermChecker struct + func NewPermChecker(c *Client, cacheTime time.Duration) *PermChecker + func NewPermCheckerWithCache(cache *GroupCache) *PermChecker + func (c *PermChecker) Allow(username string, acl []string) (bool, error) + func (c *PermChecker) CacheEvict(username string) + func (c *PermChecker) CacheEvictAll()