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) 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) 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 ¶ added in v1.0.0
type GrantResult ¶ added in v1.0.0
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AppleLoginMobile ¶ added in v0.2.0
func (m *Manager) AppleLoginMobile(login request.AppleMobileLogin) (*GrantResult, *perror.PlutoError)
func (*Manager) ApplicationDefaultRole ¶ added in v0.4.0
func (m *Manager) ApplicationDefaultRole(ar request.ApplicationRole) *perror.PlutoError
func (*Manager) AuthorizationCodeGrant ¶ added in v1.0.0
func (m *Manager) AuthorizationCodeGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
func (*Manager) BindApple ¶ added in v1.0.0
func (m *Manager) BindApple(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) BindGoogle ¶ added in v1.0.0
func (m *Manager) BindGoogle(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) BindMail ¶ added in v1.0.0
func (m *Manager) BindMail(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) BindWechat ¶ added in v1.0.0
func (m *Manager) BindWechat(binding *request.Binding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) ClientCredentialGrant ¶ added in v1.0.0
func (m *Manager) ClientCredentialGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
func (*Manager) CreateApplication ¶ added in v0.4.0
func (m *Manager) CreateApplication(ca request.CreateApplication) (*models.Application, *perror.PlutoError)
func (*Manager) CreateRole ¶ added in v0.4.0
func (m *Manager) CreateRole(cr request.CreateRole) (*models.RbacRole, *perror.PlutoError)
func (*Manager) CreateScope ¶ added in v0.4.0
func (m *Manager) CreateScope(cs request.CreateScope) (*models.RbacScope, *perror.PlutoError)
func (*Manager) GetClientByKey ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (m *Manager) GrantAccessToken(oa *request.OAuthAuthorize, accessPayload *jwt.AccessPayload) (*AuthorizeResult, *url.URL, *pluto_error.PlutoError)
func (*Manager) GrantAuthorizationCode ¶ added in v1.0.0
func (m *Manager) GrantAuthorizationCode(oa *request.OAuthAuthorize, accessPayload *jwt.AccessPayload) (*AuthorizeResult, *url.URL, *pluto_error.PlutoError)
func (*Manager) ListApplications ¶ added in v0.4.0
func (m *Manager) ListApplications() (models.ApplicationSlice, *perror.PlutoError)
func (*Manager) ListScopes ¶ added in v0.4.0
func (*Manager) MailPasswordLogin ¶ added in v1.0.0
func (m *Manager) MailPasswordLogin(login request.PasswordLogin) (*GrantResult, *perror.PlutoError)
func (*Manager) NamePasswordLogin ¶ added in v1.0.0
func (m *Manager) NamePasswordLogin(login request.PasswordLogin) (*GrantResult, *perror.PlutoError)
func (*Manager) OAuthCreateClient ¶ added in v1.0.0
func (m *Manager) OAuthCreateClient(accessPayload *jwt.AccessPayload, occ *request.OAuthCreateClient) (*modelexts.OauthClient, *perror.PlutoError)
func (*Manager) OAuthGetClient ¶ added in v1.2.0
func (m *Manager) OAuthGetClient(accessPayload *jwt.AccessPayload) ([]interface{}, *perror.PlutoError)
func (*Manager) PasswordGrant ¶ added in v1.0.0
func (m *Manager) PasswordGrant(ot *request.OAuthTokens) (*GrantResult, *perror.PlutoError)
func (*Manager) PublicUserInfo ¶ added in v1.3.3
func (m *Manager) PublicUserInfo(userID string) (map[string]interface{}, *perror.PlutoError)
func (*Manager) RandomUserName ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v0.4.0
func (m *Manager) RoleDefaultScope(rs request.RoleScope) *perror.PlutoError
func (*Manager) RoleScopeUpdate ¶ added in v1.0.0
func (m *Manager) RoleScopeUpdate(rsu request.RoleScopeUpdate) *perror.PlutoError
func (*Manager) SetUserRole ¶ added in v0.4.0
func (m *Manager) SetUserRole(ur request.UserRole) *perror.PlutoError
func (*Manager) Unbind ¶ added in v1.0.0
func (m *Manager) Unbind(ub *request.UnBinding, accessPayload *jwt.AccessPayload) *perror.PlutoError
func (*Manager) UpdateOAuthClientStatus ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (m *Manager) UserSummary() (map[string]int, *perror.PlutoError)
func (*Manager) VerifyAccessToken ¶ added in v1.0.0
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.