Documentation ¶
Index ¶
- func LoginWithEmailAndPasswordHandler(getUserByEmail func(email string) (AuthUserEmail, error)) func(c *fiber.Ctx) error
- func LoginWithPhoneOTPHandler(getUserByPhone func(phone string) (AuthUserPhone, error)) func(c *fiber.Ctx) error
- func VerifyPhoneOTPHandler(getUserByPhone func(phone string) (AuthUserPhone, error)) func(c *fiber.Ctx) error
- type AuthUserEmail
- type AuthUserPhone
- type GoogleAuth
- func (ga *GoogleAuth) GetGoogleOauthURL() string
- func (ga *GoogleAuth) GetSessionData() func(c *fiber.Ctx) error
- func (ga *GoogleAuth) GoogleCallbackBuilder(...) func(c *fiber.Ctx) error
- func (ga *GoogleAuth) GoogleHandleCallback() func(c *fiber.Ctx) error
- func (ga *GoogleAuth) GoogleLoginBuilder(authHandler func(c *fiber.Ctx) error) func(c *fiber.Ctx) error
- func (ga *GoogleAuth) GoogleLoginHandler() func(c *fiber.Ctx) error
- func (ga *GoogleAuth) IsGoogleAuthenticated(c *fiber.Ctx) bool
- func (ga *GoogleAuth) RequireGoogleAuth() func(c *fiber.Ctx) error
- type GoogleCallbackData
- type GoogleConfig
- type JWTClaimsProvider
- type LoginWithEmailAndPasswordRequest
- type LoginWithPhoneOTPRequest
- type ResponseHTTP
- type User
- type VerifyPhoneOTPRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoginWithEmailAndPasswordHandler ¶
func LoginWithEmailAndPasswordHandler(getUserByEmail func(email string) (AuthUserEmail, error)) func(c *fiber.Ctx) error
func LoginWithPhoneOTPHandler ¶
func LoginWithPhoneOTPHandler(getUserByPhone func(phone string) (AuthUserPhone, error)) func(c *fiber.Ctx) error
func VerifyPhoneOTPHandler ¶
func VerifyPhoneOTPHandler(getUserByPhone func(phone string) (AuthUserPhone, error)) func(c *fiber.Ctx) error
Types ¶
type AuthUserEmail ¶
type AuthUserEmail interface { GetEmail() string GetPassword() string GetID() string JWTClaimsProvider }
type AuthUserPhone ¶
type AuthUserPhone interface { GetPhone() string GetPassword() string GetID() string JWTClaimsProvider }
func NewAuthUserEmail ¶ added in v1.2.23
func NewAuthUserEmail(email, password, id string) AuthUserPhone
func NewAuthUserPhone ¶ added in v1.2.23
func NewAuthUserPhone(phone, password, id string) AuthUserPhone
type GoogleAuth ¶ added in v1.2.12
type GoogleAuth struct {
// contains filtered or unexported fields
}
func InitializeGoogleAuth ¶ added in v1.2.12
func InitializeGoogleAuth(config GoogleConfig) *GoogleAuth
func NewGoogleAuth ¶ added in v1.2.12
func NewGoogleAuth(config GoogleConfig) *GoogleAuth
func (*GoogleAuth) GetGoogleOauthURL ¶ added in v1.2.12
func (ga *GoogleAuth) GetGoogleOauthURL() string
func (*GoogleAuth) GetSessionData ¶ added in v1.2.19
func (ga *GoogleAuth) GetSessionData() func(c *fiber.Ctx) error
func (*GoogleAuth) GoogleCallbackBuilder ¶ added in v1.2.12
func (ga *GoogleAuth) GoogleCallbackBuilder(callbackHandler func(c *fiber.Ctx, user *models.GoogleCallbackData, tokenSess *session.Session) error) func(c *fiber.Ctx) error
func (*GoogleAuth) GoogleHandleCallback ¶ added in v1.2.12
func (ga *GoogleAuth) GoogleHandleCallback() func(c *fiber.Ctx) error
func (*GoogleAuth) GoogleLoginBuilder ¶ added in v1.2.12
func (ga *GoogleAuth) GoogleLoginBuilder(authHandler func(c *fiber.Ctx) error) func(c *fiber.Ctx) error
func (*GoogleAuth) GoogleLoginHandler ¶ added in v1.2.12
func (ga *GoogleAuth) GoogleLoginHandler() func(c *fiber.Ctx) error
func (*GoogleAuth) IsGoogleAuthenticated ¶ added in v1.2.12
func (ga *GoogleAuth) IsGoogleAuthenticated(c *fiber.Ctx) bool
func (*GoogleAuth) RequireGoogleAuth ¶ added in v1.2.12
func (ga *GoogleAuth) RequireGoogleAuth() func(c *fiber.Ctx) error
type GoogleCallbackData ¶ added in v1.2.15
type GoogleConfig ¶ added in v1.2.12
type JWTClaimsProvider ¶
type LoginWithPhoneOTPRequest ¶
type LoginWithPhoneOTPRequest struct {
Phone string `json:"phone"`
}
type ResponseHTTP ¶
type User ¶ added in v1.2.23
type User struct { Id string `json:"id"` Email string `json:"email"` Phone string `json:"phone"` Password string `json:"password"` }
func (*User) AdditionalClaims ¶ added in v1.2.23
func (*User) GetJWTClaims ¶ added in v1.2.23
func (*User) GetPassword ¶ added in v1.2.23
type VerifyPhoneOTPRequest ¶
Click to show internal directories.
Click to hide internal directories.