Documentation ¶
Index ¶
Constants ¶
View Source
const (
GOOGLE_TOKENINFO_ENDPOINT = "https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=%s"
)
View Source
const (
JWT_COOKIE_NAME = "merknerajwt"
)
Variables ¶
This section is empty.
Functions ¶
func NewJWTToken ¶
func ValidateToken ¶
Types ¶
type LoginHandler ¶
type LoginHandler struct{}
func (LoginHandler) ServeHTTP ¶
func (l LoginHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type LogoutHandler ¶
type LogoutHandler struct{}
func (LogoutHandler) ServeHTTP ¶
func (l LogoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TokenInfoResponse ¶
type TokenInfoResponse struct { Issuer string `json:"iss"` Audience string `json:"aud"` Subject string `json:"sub"` Email string `json:"email"` Name string `json:"name"` Picture string `json:"picture"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` IssuedAtUnix string `json:"iat"` IssuedAt time.Time ExpirationTimeUnix string `json:"exp"` ExpirationTime time.Time ErrorDescription string `json:"error_description"` }
func ValidateGoogleIdToken ¶
func ValidateGoogleIdToken(token string) (TokenInfoResponse, error)
Click to show internal directories.
Click to hide internal directories.