Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DebugOnlyCookieConfig = CookieConfig{ Name: "gologin-temporary-cookie", Path: "/", MaxAge: 60, HTTPOnly: true, Secure: false, }
DebugOnlyCookieConfig configures creation of short-lived temporary http.Cookie's which do NOT require cookies be sent over HTTPS! Use this config for development only.
View Source
var DefaultCookieConfig = CookieConfig{ Name: "gologin-temporary-cookie", Path: "/", MaxAge: 60, HTTPOnly: true, Secure: true, }
DefaultCookieConfig configures short-lived temporary http.Cookie creation.
View Source
var DefaultFailureHandler = http.HandlerFunc(failureHandler)
DefaultFailureHandler responds with a 400 status code and message parsed from the ctx.
Functions ¶
func ErrorFromContext ¶
ErrorFromContext returns the error value from the ctx or an error that the context was missing an error value.
Types ¶
type CookieConfig ¶
type CookieConfig struct { // Name is the desired cookie name. Name string // Domain sets the cookie domain. Defaults to the host name of the responding // server when left zero valued. Domain string // Path sets the cookie path. Defaults to the path of the URL responding to // the request when left zero valued. Path string // MaxAge=0 means no 'Max-Age' attribute should be set. // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'. // MaxAge>0 means Max-Age attribute present and given in seconds. // Cookie 'Expires' will be set (or left unset) according to MaxAge MaxAge int // HTTPOnly indicates whether the browser should prohibit a cookie from // being accessible via Javascript. Recommended true. HTTPOnly bool // Secure flag indicating to the browser that the cookie should only be // transmitted over a TLS HTTPS connection. Recommended true in production. Secure bool }
CookieConfig configures http.Cookie creation.
Directories ¶
Path | Synopsis |
---|---|
Package bitbucket provides Bitbucket OAuth2 login and callback handlers.
|
Package bitbucket provides Bitbucket OAuth2 login and callback handlers. |
Package digits provides Digits (Phone) OAuth1 login and token handlers.
|
Package digits provides Digits (Phone) OAuth1 login and token handlers. |
examples
|
|
digits
main is an example web app using Login with Digits (phone number).
|
main is an example web app using Login with Digits (phone number). |
twitter
main is an example web app using Login with Twitter.
|
main is an example web app using Login with Twitter. |
Package facebook provides Facebook OAuth2 login and callback handlers.
|
Package facebook provides Facebook OAuth2 login and callback handlers. |
Package github provides Github OAuth2 login and callback handlers.
|
Package github provides Github OAuth2 login and callback handlers. |
Package google provides Google OAuth2 login and callback handlers.
|
Package google provides Google OAuth2 login and callback handlers. |
Package oauth1 provides handles for OAuth1 login and callback requests.
|
Package oauth1 provides handles for OAuth1 login and callback requests. |
Package oauth2 provides handlers for OAuth2 login and callback requests.
|
Package oauth2 provides handlers for OAuth2 login and callback requests. |
Package testutils provides utilities for writing gologin tests.
|
Package testutils provides utilities for writing gologin tests. |
Package tumblr provides Tumblr OAuth1 login and callback handlers.
|
Package tumblr provides Tumblr OAuth1 login and callback handlers. |
Package twitter provides Twitter OAuth1 login, callback, and token handlers.
|
Package twitter provides Twitter OAuth1 login, callback, and token handlers. |
Click to show internal directories.
Click to hide internal directories.