Documentation ¶
Overview ¶
Package login provides functions and methods for LTI's modified OpenID Connect login flow.
Index ¶
Constants ¶
const ( StateCookieName = "stateCookie" LegacyStateCookieName = StateCookieName + "-legacy" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
A Login implements an http.Handler that can be easily associated with a tool URI such as /services/lti/login/.
func New ¶
New creates a new login object. If the passed Config has zero-value store interfaces, fall back on the in-memory nonpersistent.DefaultStore.
func (*Login) JSRedirect ¶
JSRedirect will return JS code to perform the redirect.
func (*Login) RedirectURI ¶
RedirectURI extracts the form data from the initial login request and returns a auth redirect URI and state cookie. The login must cache the "nonce" locally and include it in the response.
func (*Login) ServeHTTP ¶
func (l *Login) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP makes Login an http.Handler so that it can easily be associated with tool URI, e.g., /services/lti/login/. The handler must set the "state" in a cookie (in addition to including it in the response) and the two will be compared in the launch.