Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotValidAudience = errors.New("not valid audience")
View Source
var Leeway int64 = 10
Leeway in seconds (for issuedAt and ExpiresAt)
Functions ¶
This section is empty.
Types ¶
type AppleTokenInfo ¶
type AppleTokenInfo struct { Sub string `json:"sub"` Email string `json:"email"` jwt.StandardClaims }
func (*AppleTokenInfo) Valid ¶
func (c *AppleTokenInfo) Valid() error
type AuthService ¶
type AuthService interface {
// contains filtered or unexported methods
}
type GoogleTokenInfo ¶
type GoogleTokenInfo struct { Sub string `json:"sub"` Name string `json:"name"` FirstName string `json:"given_name"` LastName string `json:"family_name"` Email string `json:"email"` Picture string `json:"picture"` jwt.StandardClaims }
func (*GoogleTokenInfo) Valid ¶
func (c *GoogleTokenInfo) Valid() error
type UserDetails ¶
type UserDetails struct { ID string FirstName string LastName string UserName string Email string Picture string }
UserDetails - information about user from social network
func Auth ¶
func Auth(token string, authType Type) (userDetails *UserDetails, err error)
Auth returning user details by token and auth type
func AuthWithCheckAUD ¶
func AuthWithCheckAUD(token string, aud string, authType Type) (userDetails *UserDetails, err error)
Click to show internal directories.
Click to hide internal directories.