refresh package

import "code.pfad.fr/gopenidclient/refresh"

package refresh uses the refresh-token as a remember token (stored encrypted in a dedicated cookie).

Index

type Handler

func (Handler) ClearCookies

func (Handler) HandleRefresh

HandleRefresh should be mounted on the RootPath URI. It will use the refresh token and return the result. SetRefreshCookie will be automatically called on success.

func (Handler) HandleUnauthenticatedSession

HandleUnauthenticatedSession should be called when the session expired or is invalid. It will either redirect to the RootPath URI if the provider cookie is found or fallback to the LoginChooserHandler.

func (Handler) RootPath

RootPath is {BaseURL}/refresh

func (Handler) SetRefreshCookie

SetRefreshCookie should be called after initial authentication, to send the refresh-token as an encrypted cookie to the client. The handler MUST be on a subpath of the Handler.BaseURL.

type Refresher

Source Files

refresh.go refresher.go