Documentation ¶
Index ¶
- Constants
- type AuthorizeResult
- type GrantResult
- type Manager
- func (m *Manager) AppleLoginMobile(login request.AppleMobileLogin) (*GrantResult, *perror.PlutoError)
- func (m *Manager) ApplicationDefaultRole(ar request.ApplicationRole) *perror.PlutoError
- func (m *Manager) ApplicationI18nName(appName string, userLanguage string) (string, *perror.PlutoError)
- func (m *Manager) ApplicationI18nNameList(appId uint) (*modelexts.ApplicationI18nNameInfo, *perror.PlutoError)
- func (m *Manager) AuthorizationCodeGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
- func (m *Manager) BindApple(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
- func (m *Manager) BindGoogle(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
- func (m *Manager) BindMail(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
- func (m *Manager) BindWechat(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
- func (m *Manager) ClientCredentialGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
- func (m *Manager) CreateApplication(ca request.CreateApplication) (*models.Application, *perror.PlutoError)
- func (m *Manager) CreateRole(cr request.CreateRole) (*models.RbacRole, *perror.PlutoError)
- func (m *Manager) CreateScope(cs request.CreateScope) (*models.RbacScope, *perror.PlutoError)
- func (m *Manager) FindUser(fu *request.FindUser) ([]*modelexts.FindUser, *perror.PlutoError)
- func (m *Manager) GetClientByKey(key string) (*models.OauthClient, *perror.PlutoError)
- func (m *Manager) GoogleLoginMobile(login request.GoogleMobileLogin) (*GrantResult, *perror.PlutoError)
- func (m *Manager) GrantAccessToken(oa *request.OAuthAuthorize, accessPayload *jwt.AccessPayload) (*AuthorizeResult, *url.URL, *pluto_error.PlutoError)
- func (m *Manager) GrantAuthorizationCode(oa *request.OAuthAuthorize, accessPayload *jwt.AccessPayload) (*AuthorizeResult, *url.URL, *pluto_error.PlutoError)
- func (m *Manager) ListApplications() (models.ApplicationSlice, *perror.PlutoError)
- func (m *Manager) ListRoles(appID uint) (*modelexts.Roles, *perror.PlutoError)
- func (m *Manager) ListScopes(appID uint) (*modelexts.Scopes, *perror.PlutoError)
- func (m *Manager) MailPasswordLogin(login request.PasswordLogin) (*GrantResult, *perror.PlutoError)
- func (m *Manager) NamePasswordLogin(login request.PasswordLogin) (*GrantResult, *perror.PlutoError)
- func (m *Manager) OAuthCreateClient(accessPayload *jwt.AccessPayload, occ *request.OAuthCreateClient) (*modelexts.OauthClient, *perror.PlutoError)
- func (m *Manager) OAuthGetClient(accessPayload *jwt.AccessPayload) ([]interface{}, *perror.PlutoError)
- func (m *Manager) PasswordGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
- func (m *Manager) PublicUserInfo(userID string) (map[string]interface{}, *perror.PlutoError)
- func (m *Manager) RandomUserName(prefix string) (string, *perror.PlutoError)
- func (m *Manager) RefreshAccessToken(rat request.RefreshAccessToken) (*GrantResult, *perror.PlutoError)
- func (m *Manager) RefreshTokenGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
- func (m *Manager) RegisterVerify(token string) *perror.PlutoError
- func (m *Manager) RegisterVerifyMail(rvm request.RegisterVerifyMail) (*models.User, *perror.PlutoError)
- func (m *Manager) RegisterWithEmail(register request.MailRegister, admin bool) (*models.User, *perror.PlutoError)
- func (m *Manager) ResetPassword(token string, rp request.ResetPasswordWeb) *perror.PlutoError
- func (m *Manager) ResetPasswordMail(rpm request.ResetPasswordMail) *perror.PlutoError
- func (m *Manager) ResetPasswordPage(token string) *perror.PlutoError
- func (m *Manager) RoleDefaultScope(rs request.RoleScope) *perror.PlutoError
- func (m *Manager) RoleScopeUpdate(rsu request.RoleScopeUpdate) *perror.PlutoError
- func (m *Manager) SetUserRole(ur request.UserRole) *perror.PlutoError
- func (m *Manager) Unbind(ub *request.UnBinding, accessPayload *jwt.AccessPayload) *perror.PlutoError
- func (m *Manager) UpdateApplicationI18nNames(uai request.UpdateApplicationI18Name) *perror.PlutoError
- func (m *Manager) UpdateOAuthClientStatus(occ *request.OAuthClientStatus) (*models.OauthClient, *perror.PlutoError)
- func (m *Manager) UpdateUserInfo(accessPayload *jwt.AccessPayload, uui request.UpdateUserInfo) *perror.PlutoError
- func (m *Manager) UserInfo(userID uint, accessPayload *jwt.AccessPayload) (*modelexts.User, *perror.PlutoError)
- func (m *Manager) UserSummary() (map[string]int, *perror.PlutoError)
- func (m *Manager) VerifyAccessToken(accessToken string) (*jwt.AccessPayload, *perror.PlutoError)
- func (m *Manager) WechatLoginMobile(login request.WechatMobileLogin) (*GrantResult, *perror.PlutoError)
Constants ¶
View Source
const ( ClientPend = "pend" ClientApproved = "approved" ClientDenied = "denied" )
View Source
const ( MAILLOGIN = "mail" GOOGLELOGIN = "google" WECHATLOGIN = "wechat" APPLELOGIN = "apple" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeResult ¶
type GrantResult ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AppleLoginMobile ¶
func (m *Manager) AppleLoginMobile(login request.AppleMobileLogin) (*GrantResult, *perror.PlutoError)
func (*Manager) ApplicationDefaultRole ¶
func (m *Manager) ApplicationDefaultRole(ar request.ApplicationRole) *perror.PlutoError
func (*Manager) ApplicationI18nName ¶ added in v1.4.3
func (*Manager) ApplicationI18nNameList ¶ added in v1.4.3
func (m *Manager) ApplicationI18nNameList(appId uint) (*modelexts.ApplicationI18nNameInfo, *perror.PlutoError)
func (*Manager) AuthorizationCodeGrant ¶
func (m *Manager) AuthorizationCodeGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
func (*Manager) BindApple ¶
func (m *Manager) BindApple(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) BindGoogle ¶
func (m *Manager) BindGoogle(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) BindMail ¶
func (m *Manager) BindMail(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) BindWechat ¶
func (m *Manager) BindWechat(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) ClientCredentialGrant ¶
func (m *Manager) ClientCredentialGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
func (*Manager) CreateApplication ¶
func (m *Manager) CreateApplication(ca request.CreateApplication) (*models.Application, *perror.PlutoError)
func (*Manager) CreateRole ¶
func (m *Manager) CreateRole(cr request.CreateRole) (*models.RbacRole, *perror.PlutoError)
func (*Manager) CreateScope ¶
func (m *Manager) CreateScope(cs request.CreateScope) (*models.RbacScope, *perror.PlutoError)
func (*Manager) GetClientByKey ¶
func (m *Manager) GetClientByKey(key string) (*models.OauthClient, *perror.PlutoError)
func (*Manager) GoogleLoginMobile ¶
func (m *Manager) GoogleLoginMobile(login request.GoogleMobileLogin) (*GrantResult, *perror.PlutoError)
func (*Manager) GrantAccessToken ¶
func (m *Manager) GrantAccessToken(oa *request.OAuthAuthorize, accessPayload *jwt.AccessPayload) (*AuthorizeResult, *url.URL, *pluto_error.PlutoError)
func (*Manager) GrantAuthorizationCode ¶
func (m *Manager) GrantAuthorizationCode(oa *request.OAuthAuthorize, accessPayload *jwt.AccessPayload) (*AuthorizeResult, *url.URL, *pluto_error.PlutoError)
func (*Manager) ListApplications ¶
func (m *Manager) ListApplications() (models.ApplicationSlice, *perror.PlutoError)
func (*Manager) ListScopes ¶
func (*Manager) MailPasswordLogin ¶
func (m *Manager) MailPasswordLogin(login request.PasswordLogin) (*GrantResult, *perror.PlutoError)
func (*Manager) NamePasswordLogin ¶
func (m *Manager) NamePasswordLogin(login request.PasswordLogin) (*GrantResult, *perror.PlutoError)
func (*Manager) OAuthCreateClient ¶
func (m *Manager) OAuthCreateClient(accessPayload *jwt.AccessPayload, occ *request.OAuthCreateClient) (*modelexts.OauthClient, *perror.PlutoError)
func (*Manager) OAuthGetClient ¶
func (m *Manager) OAuthGetClient(accessPayload *jwt.AccessPayload) ([]interface{}, *perror.PlutoError)
func (*Manager) PasswordGrant ¶
func (m *Manager) PasswordGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
func (*Manager) PublicUserInfo ¶
func (m *Manager) PublicUserInfo(userID string) (map[string]interface{}, *perror.PlutoError)
func (*Manager) RandomUserName ¶
func (m *Manager) RandomUserName(prefix string) (string, *perror.PlutoError)
func (*Manager) RefreshAccessToken ¶
func (m *Manager) RefreshAccessToken(rat request.RefreshAccessToken) (*GrantResult, *perror.PlutoError)
func (*Manager) RefreshTokenGrant ¶
func (m *Manager) RefreshTokenGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
func (*Manager) RegisterVerify ¶
func (m *Manager) RegisterVerify(token string) *perror.PlutoError
func (*Manager) RegisterVerifyMail ¶
func (m *Manager) RegisterVerifyMail(rvm request.RegisterVerifyMail) (*models.User, *perror.PlutoError)
func (*Manager) RegisterWithEmail ¶
func (m *Manager) RegisterWithEmail(register request.MailRegister, admin bool) (*models.User, *perror.PlutoError)
func (*Manager) ResetPassword ¶
func (m *Manager) ResetPassword(token string, rp request.ResetPasswordWeb) *perror.PlutoError
func (*Manager) ResetPasswordMail ¶
func (m *Manager) ResetPasswordMail(rpm request.ResetPasswordMail) *perror.PlutoError
func (*Manager) ResetPasswordPage ¶
func (m *Manager) ResetPasswordPage(token string) *perror.PlutoError
func (*Manager) RoleDefaultScope ¶
func (m *Manager) RoleDefaultScope(rs request.RoleScope) *perror.PlutoError
func (*Manager) RoleScopeUpdate ¶
func (m *Manager) RoleScopeUpdate(rsu request.RoleScopeUpdate) *perror.PlutoError
func (*Manager) SetUserRole ¶
func (m *Manager) SetUserRole(ur request.UserRole) *perror.PlutoError
func (*Manager) Unbind ¶
func (m *Manager) Unbind(ub *request.UnBinding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) UpdateApplicationI18nNames ¶ added in v1.4.3
func (m *Manager) UpdateApplicationI18nNames(uai request.UpdateApplicationI18Name) *perror.PlutoError
func (*Manager) UpdateOAuthClientStatus ¶
func (m *Manager) UpdateOAuthClientStatus(occ *request.OAuthClientStatus) (*models.OauthClient, *perror.PlutoError)
func (*Manager) UpdateUserInfo ¶
func (m *Manager) UpdateUserInfo(accessPayload *jwt.AccessPayload, uui request.UpdateUserInfo) *perror.PlutoError
func (*Manager) UserInfo ¶
func (m *Manager) UserInfo(userID uint, accessPayload *jwt.AccessPayload) (*modelexts.User, *perror.PlutoError)
func (*Manager) UserSummary ¶
func (m *Manager) UserSummary() (map[string]int, *perror.PlutoError)
func (*Manager) VerifyAccessToken ¶
func (m *Manager) VerifyAccessToken(accessToken string) (*jwt.AccessPayload, *perror.PlutoError)
func (*Manager) WechatLoginMobile ¶
func (m *Manager) WechatLoginMobile(login request.WechatMobileLogin) (*GrantResult, *perror.PlutoError)
Click to show internal directories.
Click to hide internal directories.