Documentation ¶
Index ¶
- Variables
- func NewHandler(c *Config) (http.Handler, error)
- func RequireTokenAuth(identity identity.PublicIdentity, h http.Handler) http.Handler
- func TokenFromContext(ctx context.Context) *jwt.Token
- type Config
- type DashboardPage
- type NewIdentityPage
- type NewIdentityRequest
- type NewIdentityResponse
- type NewTokenPage
- type NewTokenResponse
- type Page
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorNotAuthenticated = fmt.Errorf("Token not found in request context")
)
Functions ¶
func RequireTokenAuth ¶
func TokenFromContext ¶
Types ¶
type DashboardPage ¶
type DashboardPage struct { *Page AccessToken *jwt.Token }
type NewIdentityPage ¶
type NewIdentityRequest ¶
type NewIdentityResponse ¶
type NewIdentityResponse struct {
ID string `json:"id"`
}
type NewTokenPage ¶
type NewTokenResponse ¶
type NewTokenResponse struct {
Token string `json:"token"`
}
Click to show internal directories.
Click to hide internal directories.