Documentation
¶
Index ¶
Constants ¶
View Source
const Root = "/oauth2"
Root is the root of all OAuth-related routes.
Variables ¶
View Source
var AuthZProvider authz.AuthZProviderType[OauthAuthZ]
AuthZProvider is the authz registry for experiments.
Functions ¶
func RegisterAPIHandler ¶
RegisterAPIHandler registers endpoints used by OAuth.
Types ¶
type OauthAuthZ ¶
type OauthAuthZ interface {
// CanAdministrateOauth returns an error if the user is not authorized to manage oauth.
CanAdministrateOauth(ctx context.Context, curUser model.User) error
}
OauthAuthZ describes authz methods for experiments.
type OauthAuthZBasic ¶
type OauthAuthZBasic struct{}
OauthAuthZBasic is basic OSS controls.
func (*OauthAuthZBasic) CanAdministrateOauth ¶
CanAdministrateOauth returns an error if the current user is not an admin.
type OauthAuthZPermissive ¶
type OauthAuthZPermissive struct{}
OauthAuthZPermissive is the permission implementation.
func (*OauthAuthZPermissive) CanAdministrateOauth ¶
func (a *OauthAuthZPermissive) CanAdministrateOauth(ctx context.Context, curUser model.User, ) error
CanAdministrateOauth calls RBAC authz but enforces basic authz.
type OauthAuthZRBAC ¶
type OauthAuthZRBAC struct{}
OauthAuthZRBAC is the RBAC implementation of the OauthAuthZ interface.
func (*OauthAuthZRBAC) CanAdministrateOauth ¶
func (a *OauthAuthZRBAC) CanAdministrateOauth( ctx context.Context, curUser model.User, ) (err error)
CanAdministrateOauth checks if the user has permission to view and modify oauth clients and settings.
Click to show internal directories.
Click to hide internal directories.