Documentation ¶
Index ¶
- Constants
- type AuthProviderEntity
- type Authentication
- func (t *Authentication) Authenticate(ormService *beeorm.Engine, uniqueValue string, password string, ...) (accessToken string, refreshToken string, err error)
- func (t *Authentication) AuthenticateByID(ormService *beeorm.Engine, id uint64, entity AuthProviderEntity) (accessToken string, refreshToken string, err error)
- func (t *Authentication) GenerateTokenPair(id uint64, accessKey string, ttl int) (string, error)
- func (t *Authentication) LogoutAllSessions(ormService *beeorm.Engine, id uint64)
- func (t *Authentication) LogoutCurrentSession(ormService *beeorm.Engine, accessKey string)
- func (t *Authentication) RefreshToken(ormService *beeorm.Engine, refreshToken string) (newAccessToken string, newRefreshToken string, err error)
- func (t *Authentication) VerifyAccessToken(ormService *beeorm.Engine, accessToken string, entity beeorm.Entity) (map[string]string, error)
- func (t *Authentication) VerifySocialLogin(source, token string) (*social.UserData, error)
- type GenerateOTPEmail
Constants ¶
View Source
const ( SocialLoginGoogle = "google" SocialLoginFacebook = "facebook" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProviderEntity ¶ added in v0.3.1
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
func (*Authentication) Authenticate ¶
func (t *Authentication) Authenticate(ormService *beeorm.Engine, uniqueValue string, password string, entity AuthProviderEntity) (accessToken string, refreshToken string, err error)
func (*Authentication) AuthenticateByID ¶ added in v0.5.0
func (t *Authentication) AuthenticateByID(ormService *beeorm.Engine, id uint64, entity AuthProviderEntity) (accessToken string, refreshToken string, err error)
func (*Authentication) GenerateTokenPair ¶ added in v0.3.1
func (*Authentication) LogoutAllSessions ¶ added in v0.3.1
func (t *Authentication) LogoutAllSessions(ormService *beeorm.Engine, id uint64)
func (*Authentication) LogoutCurrentSession ¶ added in v0.3.1
func (t *Authentication) LogoutCurrentSession(ormService *beeorm.Engine, accessKey string)
func (*Authentication) RefreshToken ¶
func (*Authentication) VerifyAccessToken ¶
func (*Authentication) VerifySocialLogin ¶ added in v0.6.2
func (t *Authentication) VerifySocialLogin(source, token string) (*social.UserData, error)
type GenerateOTPEmail ¶ added in v0.5.8
Click to show internal directories.
Click to hide internal directories.