keycloak

package
v0.0.0-...-1af33b5 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(email string) error

CreateUser creates a new user if the user does not already exist.

func GetToken

func GetToken() error

GetToken grabs the token for the admin api.

func ParseMagicLinkForm

func ParseMagicLinkForm(body io.Reader) (string, error)

ParseMagicLinkForm parses the formUrl out of a keycloak magic link http response

func SendVerificationEmail

func SendVerificationEmail(email string) error

SendVerificationEmail verifies the email and let the user set a password.

func SendWelcomeEmail

func SendWelcomeEmail(email string) error

SendWelcomeEmail sends the user a magic link

Types

type UserExistsError

type UserExistsError struct {
	User string
}

UserExistsError is returned when the user already exists

func (*UserExistsError) Error

func (e *UserExistsError) Error() string

type Users

type Users struct {
	UserName string `json:"username"`
	ID       string `json:"id"`
}

Users is a struct that contains useful user data.

func GetUser

func GetUser(email string) ([]Users, error)

GetUser checks if the user exists first.

Jump to

Keyboard shortcuts

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