Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JwtMockSet = wire.NewSet(ProvideTokenService, aws.ProvideAWSService, aws.AwsMockSet)
View Source
var JwtSet = wire.NewSet(ProvideTokenService, aws.ProvideAWSService, aws.AwsSet)
Functions ¶
This section is empty.
Types ¶
type GoogleTokenInfo ¶
type GoogleTokenInfo struct { Iss string `json:"iss"` // userId Sub string `json:"sub"` Azp string `json:"azp"` // clientId Aud string `json:"aud"` Iat int64 `json:"iat"` // expired time Exp int64 `json:"exp"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` AtHash string `json:"at_hash"` Name string `json:"name"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Picture string `json:"picture"` Local string `json:"locale"` jwt.StandardClaims }
TokenInfo struct
func ParseUserFromGoogleIDToken ¶
func ParseUserFromGoogleIDToken(id_token string) (*GoogleTokenInfo, error)
type MyCustomClaims ¶
type MyCustomClaims struct { UserId string `json:"userId"` Email string `json:"email"` jwt.StandardClaims }
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func ProvideTokenService ¶
func ProvideTokenService(awsService *aws.AWSService) *TokenService
func (*TokenService) NewToken ¶
func (service *TokenService) NewToken(id, email string) (*MyToken, error)
func (*TokenService) ParseToken ¶
func (service *TokenService) ParseToken(tokenString string) (*MyCustomClaims, error)
Click to show internal directories.
Click to hide internal directories.