Documentation ¶
Index ¶
- func NewRoleManager(clientID string, clientSecret string, tenant string, apiEndpoint string) rbac.RoleManager
- type RoleManager
- func (rm *RoleManager) AddLink(name1 string, name2 string, domain ...string) error
- func (rm *RoleManager) Clear() error
- func (rm *RoleManager) DeleteLink(name1 string, name2 string, domain ...string) error
- func (rm *RoleManager) GetRoles(name string, domain ...string) ([]string, error)
- func (rm *RoleManager) GetUsers(name string, domain ...string) ([]string, error)
- func (rm *RoleManager) HasLink(name1 string, name2 string, domain ...string) (bool, error)
- func (rm *RoleManager) PrintRoles() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoleManager ¶
func NewRoleManager(clientID string, clientSecret string, tenant string, apiEndpoint string) rbac.RoleManager
NewRoleManager is the constructor of an Auth0 RoleManager instance. clientID is the Client ID. clientSecret is the Client Secret. tenant is your tenant name. If your domain is: abc.auth0.com, then abc is your tenant name. apiEndpoint is the base URL for your Auth0 Authorization Extension, it should be something like: "https://abc.us.webtask.io/adf6e2f2b84784b57522e3b19dfc9201", there is no "/admins", "/admins/login", "/users" or "/api" in the end.
Types ¶
type RoleManager ¶
type RoleManager struct {
// contains filtered or unexported fields
}
func (*RoleManager) AddLink ¶
func (rm *RoleManager) AddLink(name1 string, name2 string, domain ...string) error
AddLink adds the inheritance link between role: name1 and role: name2. domain is not used.
func (*RoleManager) Clear ¶
func (rm *RoleManager) Clear() error
Clear clears all stored data and resets the role manager to the initial state.
func (*RoleManager) DeleteLink ¶
func (rm *RoleManager) DeleteLink(name1 string, name2 string, domain ...string) error
DeleteLink deletes the inheritance link between role: name1 and role: name2. domain is not used.
func (*RoleManager) GetRoles ¶
func (rm *RoleManager) GetRoles(name string, domain ...string) ([]string, error)
GetRoles gets the roles that a subject inherits. domain is not used.
func (*RoleManager) GetUsers ¶
func (rm *RoleManager) GetUsers(name string, domain ...string) ([]string, error)
GetUsers gets the users that inherits a subject. domain is not used.
func (*RoleManager) HasLink ¶
HasLink determines whether role: name1 inherits role: name2. domain is not used.
func (*RoleManager) PrintRoles ¶
func (rm *RoleManager) PrintRoles() error
PrintRoles prints all the roles to log.