Versions in this module Expand all Collapse all v0 v0.0.3 May 24, 2024 Changes in this version + var NotConfigured = errors.New("oauth2 not configured") + var ProfileNotFound = errors.New("profile not found") + var SessionNotFound = errors.New("oauth2 session not found") + var TokenInvalid = errors.New("oauth2 token invalid") + var TokenNotFound = errors.New("oauth2 token not found") + func GetClaims(tokString string, secret []byte) (map[string]interface{}, error) + func GetHexSecret(ctx context.Context, projectID, key string) ([]byte, error) + func GetSecret(ctx context.Context, projectID, key string) (string, error) + func GetSecrets(ctx context.Context, projectID string, keys []string) (map[string]string, error) + func PutClaims(claims map[string]interface{}, secret []byte) (string, error) + func ReadGoogleStorageBucket(ctx context.Context, url string) ([]byte, error) + type Profile struct + Data string + Email string + FamilyName string + GivenName string + Locale string + type UserAuth struct + ClientID string + MaxAge int + ProjectID string + SessionID string + func (ua *UserAuth) CallbackHandler(w http.ResponseWriter, r *http.Request) error + func (ua *UserAuth) GetProfile(w http.ResponseWriter, r *http.Request) (*Profile, error) + func (ua *UserAuth) Init() + func (ua *UserAuth) LoginHandler(w http.ResponseWriter, r *http.Request) error + func (ua *UserAuth) LogoutHandler(w http.ResponseWriter, r *http.Request) error + func (ua *UserAuth) PutData(w http.ResponseWriter, r *http.Request, data string) error