Documentation ¶
Index ¶
- func Auth(w http.ResponseWriter, r *http.Request)
- func Error500f(w http.ResponseWriter, format string, a ...interface{})
- func Errorf(w http.ResponseWriter, oauthError OAuthError, format string, a ...interface{})
- func Fatalf(format string, a ...interface{})
- func Token(w http.ResponseWriter, r *http.Request)
- type OAuthError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth(w http.ResponseWriter, r *http.Request)
Auth implements the Google Cloud Functions entrypoint.
func Error500f ¶
func Error500f(w http.ResponseWriter, format string, a ...interface{})
Error500f creates an HTTP 500 error response.
func Errorf ¶
func Errorf(w http.ResponseWriter, oauthError OAuthError, format string, a ...interface{})
Errorf creates an HTTP error response.
Types ¶
type OAuthError ¶
type OAuthError string
OAuthError defines OAuth2 errors
const ( ErrorInvalidRequest OAuthError = "invalid_request" ErrorInvalidClient OAuthError = "invalid_client" ErrorInvalidGrant OAuthError = "invalid_grant" ErrorUnsupportedGrantType OAuthError = "unsupported_grant_type" ErrorInvalidScope OAuthError = "invalid_scope" )
OAuth2 errors
Click to show internal directories.
Click to hide internal directories.