Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FacebookTokenValidator ¶
FacebookTokenValidator to validate the facebook OAuth tokens
func NewFacebookTokenValidator ¶
func NewFacebookTokenValidator(applicationID, APIVersion string, timeOut, retryCount int, debugMode bool) *FacebookTokenValidator
NewFacebookTokenValidator returns a new FacebookUserInfos struct
func (*FacebookTokenValidator) SourceName ¶
func (validator *FacebookTokenValidator) SourceName() string
SourceName returns the source name of the token
func (*FacebookTokenValidator) VerifyTokenAndExtractInfos ¶
func (validator *FacebookTokenValidator) VerifyTokenAndExtractInfos(token string) (TokenInfos, bool)
VerifyTokenAndExtractInfos verifies a facebook access token and extracts the user informations from the token
type GoogleTokenValidator ¶
GoogleTokenValidator to validate the google OAuth tokens
func NewGoogleTokenValidator ¶
func NewGoogleTokenValidator(clientID, APIVersion string, timeOut, retryCount int, debugMode bool) *GoogleTokenValidator
NewGoogleTokenValidator returns a new GoogleTokenValidator struct
func (*GoogleTokenValidator) SourceName ¶
func (validator *GoogleTokenValidator) SourceName() string
SourceName returns the source name of the token
func (*GoogleTokenValidator) VerifyTokenAndExtractInfos ¶
func (validator *GoogleTokenValidator) VerifyTokenAndExtractInfos(token string) (TokenInfos, bool)
VerifyTokenAndExtractInfos verifies a facebook access token
type TokenInfos ¶
type TokenInfos struct { Token string UserID string Email string LastName string FirstName string CreatedAt time.Time ExpiresAt time.Time }
TokenInfos struct about the informations of a token
type TokenValidator ¶
type TokenValidator interface { SourceName() string VerifyTokenAndExtractInfos(token string) (TokenInfos, bool) }
TokenValidator validates a auth token
Click to show internal directories.
Click to hide internal directories.