Documentation ¶
Index ¶
- Constants
- Variables
- func AdminSignupHandle(c *fiber.Ctx) error
- func ChangePasswordHandler(c *fiber.Ctx) error
- func CheckAdminHandler(c *fiber.Ctx) error
- func ForgetPasswordFormHandler(c *fiber.Ctx) error
- func ForgetPasswordPageHandler(c *fiber.Ctx) error
- func Login2Handle(c *fiber.Ctx) error
- func LoginAdminHandler(c *fiber.Ctx) error
- func LoginGithubHandler(c *fiber.Ctx) error
- func LoginGoogleHandler(c *fiber.Ctx) error
- func LoginPageHandler(c *fiber.Ctx) error
- func LoginTelarHandler(c *fiber.Ctx) error
- func LoginTelarHandlerSPA(c *fiber.Ctx, model *models.LoginModel) error
- func LoginTelarHandlerSSR(c *fiber.Ctx, model *models.LoginModel) error
- func OAuth2Handler(c *fiber.Ctx) error
- func PrintClaim(claims jwt.MapClaims)
- func ResetPasswordFormHandler(c *fiber.Ctx) error
- func ResetPasswordPageHandler(c *fiber.Ctx) error
- func Signup2Handle(c *fiber.Ctx) error
- func SignupPageHandler(c *fiber.Ctx) error
- func SignupTokenHandle(c *fiber.Ctx) error
- func UnixToTime(epoch float64) string
- func UpdateProfileHandle(c *fiber.Ctx) error
- func VerifySignupHandle(c *fiber.Ctx) error
- func VerifySignupSPA(c *fiber.Ctx, model *models.VerifySignupModel) error
- func VerifySignupSSR(c *fiber.Ctx, model *models.VerifySignupModel) error
- type CreateActionRoomModel
- type Organization
- type ProfileResultAsync
- type ProviderAccessToken
- type ResetPasswordClaims
- type TelarSocailClaims
- type TokenModel
- type UpdateProfileQueryModel
- type User
- type UserClaim
- type UserInfoInReq
- type UsersLangSettingsResultAsync
Constants ¶
const ( SPAResponseType = "spa" SSRResponseType = "ssr" )
const UpdateAllType = 0
const UpdateGeneralType = 1
const UpdateSocialInfoType = 2
Variables ¶
var NotFoundHTTPStatusError = errors.New("NotFoundHTTPStatusError")
Functions ¶
func AdminSignupHandle ¶
func AdminSignupHandle(c *fiber.Ctx) error
AdminSignupHandle verify signup token
func ChangePasswordHandler ¶
func ChangePasswordHandler(c *fiber.Ctx) error
ChangePasswordHandler creates a handler for logging in
func CheckAdminHandler ¶
func CheckAdminHandler(c *fiber.Ctx) error
CheckAdminHandler creates a handler to check whether admin user registered
func ForgetPasswordFormHandler ¶
func ForgetPasswordFormHandler(c *fiber.Ctx) error
ForgetPasswordFormHandler
func ForgetPasswordPageHandler ¶
func ForgetPasswordPageHandler(c *fiber.Ctx) error
ForgetPasswordPageHandler creates a handler for logging in
func Login2Handle ¶
func Login2Handle(c *fiber.Ctx) error
Login2Handle creates a handler for logging in telar social
func LoginAdminHandler ¶
func LoginAdminHandler(c *fiber.Ctx) error
LoginAdminHandler creates a handler for logging in telar social
func LoginGithubHandler ¶
func LoginGithubHandler(c *fiber.Ctx) error
LoginGithubHandler creates a handler for logging in github
func LoginGoogleHandler ¶
func LoginGoogleHandler(c *fiber.Ctx) error
LoginGoogleHandler makes a handler for OAuth 2.0 redirects
func LoginPageHandler ¶
func LoginPageHandler(c *fiber.Ctx) error
LoginPageHandler creates a handler for logging in
func LoginTelarHandler ¶
func LoginTelarHandler(c *fiber.Ctx) error
LoginTelarHandler creates a handler for logging in telar social
func LoginTelarHandlerSPA ¶
func LoginTelarHandlerSPA(c *fiber.Ctx, model *models.LoginModel) error
LoginTelarHandlerSPA creates a handler for logging in telar social
func LoginTelarHandlerSSR ¶
func LoginTelarHandlerSSR(c *fiber.Ctx, model *models.LoginModel) error
LoginTelarHandlerSSR creates a handler for logging in telar social
func OAuth2Handler ¶
func OAuth2Handler(c *fiber.Ctx) error
OAuth2Handler makes a handler for OAuth 2.0 redirects
func PrintClaim ¶
func ResetPasswordFormHandler ¶
func ResetPasswordFormHandler(c *fiber.Ctx) error
ResetPasswordFormHandler creates a handler for logging in
func ResetPasswordPageHandler ¶
func ResetPasswordPageHandler(c *fiber.Ctx) error
ResetPasswordPageHandler creates a handler for logging in
func Signup2Handle ¶
func Signup2Handle(c *fiber.Ctx) error
func SignupPageHandler ¶
func SignupPageHandler(c *fiber.Ctx) error
SignupPageHandler creates a handler for logging in
func SignupTokenHandle ¶
func SignupTokenHandle(c *fiber.Ctx) error
SignupTokenHandle create signup token
func UnixToTime ¶
func UpdateProfileHandle ¶
func UpdateProfileHandle(c *fiber.Ctx) error
UpdateProfileHandle a function invocation
func VerifySignupHandle ¶
func VerifySignupHandle(c *fiber.Ctx) error
VerifySignupHandle verify signup token
func VerifySignupSPA ¶
func VerifySignupSPA(c *fiber.Ctx, model *models.VerifySignupModel) error
func VerifySignupSSR ¶
func VerifySignupSSR(c *fiber.Ctx, model *models.VerifySignupModel) error
Types ¶
type CreateActionRoomModel ¶
type Organization ¶
type Organization struct {
Login string `json:"login"`
}
type ProfileResultAsync ¶
type ProfileResultAsync struct { Profile *models.UserProfileModel Error error }
type ProviderAccessToken ¶
type ProviderAccessToken struct {
AccessToken string `json:"access_token"`
}
ProviderAccessToken as issued by GitHub or GitLab
type ResetPasswordClaims ¶
type ResetPasswordClaims struct { VerifyId string `json:"verifyId"` jwt.StandardClaims }
type TelarSocailClaims ¶
type TelarSocailClaims struct { // Name is the full name of the user for OIDC Name string `json:"name"` // AccessToken for use with the GitHub Profile API AccessToken string `json:"access_token"` // String with all organizations separated with commas Organizations string `json:"organizations"` // User information Claim UserClaim `json:"claim"` // Inherit from standard claims jwt.StandardClaims }
TelarSocailClaims extends standard claims
type TokenModel ¶
type TokenModel struct {
// contains filtered or unexported fields
}
type UpdateProfileQueryModel ¶
type UpdateProfileQueryModel struct {
UpdateType int `query:"updateType"`
}
type UserClaim ¶
type UserClaim struct { DisplayName string `json:"displayName"` SocialName string `json:"socialName"` Organizations string `json:"organizations"` Avatar string `json:"avatar"` Banner string `json:"banner"` TagLine string `json:"tagLine"` UserId string `json:"uid"` Email string `json:"email"` CreatedDate int64 `json:"createdDate"` Role string `json:"role"` }
User information claim
type UserInfoInReq ¶
type UsersLangSettingsResultAsync ¶
type UsersLangSettingsResultAsync struct { Error error // contains filtered or unexported fields }