login

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(claims *Claims) (string, error)

func ThirdPartyLoginEnabled

func ThirdPartyLoginEnabled() *enabledStatus

Types

type Claims

type Claims struct {
	Name              string          `json:"name"`
	Email             string          `json:"email"`
	UID               string          `json:"uid"`
	PreferredUsername string          `json:"preferred_username"`
	FederatedClaims   FederatedClaims `json:"federated_claims"`
	jwt.StandardClaims
}

type FederatedClaims

type FederatedClaims struct {
	ConnectorId string `json:"connector_id"`
	UserId      string `json:"user_id"`
}

type LoginArgs

type LoginArgs struct {
	Account  string `json:"account"`
	Password string `json:"password"`
}

type User

type User struct {
	Uid          string `json:"uid"`
	Token        string `json:"token"`
	Email        string `json:"email"`
	Phone        string `json:"phone"`
	Name         string `json:"name"`
	Account      string `json:"account"`
	IdentityType string `json:"identityType"`
}

func LocalLogin

func LocalLogin(args *LoginArgs, logger *zap.SugaredLogger) (*User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL