type MyAuthorizer struct { // ... } func (a *MyAuthorizer) Authorize(reqCtx api.RequestContext, creds []api.AuthCredentials) bool { // ... }
type MyAuthEnvironManager struct { // ... } func (m *MyAuthEnvironManager) AddUser(username string, password string, roles []string) (string, error) { // ... } func (m *MyAuthEnvironManager) RevokeAccess(username string) error { // ... }Together, these interfaces provide a framework for implementing custom authentication and authorization logic in a Juju API server.