handlers

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package handlers contains various web handlers for the authenticate service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceEnrolled

func DeviceEnrolled(data UserInfoData) http.Handler

DeviceEnrolled displays an HTML page informing the user that they've successfully enrolled a device.

func SignOutConfirm

func SignOutConfirm(data SignOutConfirmData) http.Handler

SignOutConfirm returns a handler that renders the sign out confirm page.

func UserInfo

func UserInfo(data UserInfoData) http.Handler

UserInfo returns a handler that renders the user info page.

Types

type SignOutConfirmData

type SignOutConfirmData struct {
	URL string
}

SignOutConfirmData is the data for the SignOutConfirm page.

func (SignOutConfirmData) ToJSON

func (data SignOutConfirmData) ToJSON() map[string]interface{}

ToJSON converts the data into a JSON map.

type UserInfoData

type UserInfoData struct {
	CSRFToken      string
	IsImpersonated bool
	Session        *session.Session
	User           *user.User

	IsEnterprise    bool
	DirectoryUser   *directory.User
	DirectoryGroups []*directory.Group

	WebAuthnCreationOptions *webauthn.PublicKeyCredentialCreationOptions
	WebAuthnRequestOptions  *webauthn.PublicKeyCredentialRequestOptions
	WebAuthnURL             string

	BrandingOptions httputil.BrandingOptions
}

UserInfoData is the data for the UserInfo page.

func (UserInfoData) ToJSON

func (data UserInfoData) ToJSON() map[string]any

ToJSON converts the data into a JSON map.

Directories

Path Synopsis
Package webauthn contains handlers for the WebAuthn flow in authenticate.
Package webauthn contains handlers for the WebAuthn flow in authenticate.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL