authentication

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Oauth2 *oauth2.Providers
	// contains filtered or unexported fields
}

func New

func New(p sdkParams) *Handler

func (*Handler) Build

func (h *Handler) Build(opts ...connect.HandlerOption) (string, http.Handler)

func (*Handler) Delete

Delete removes a user from the namespace.

func (*Handler) Get

Get fetches a user from the namespace using its id in the access token.

func (*Handler) GetAuthConfig

GetAuthConfig this returns a config for a specific namespace together with urls to all OIDC providers.

func (*Handler) Login

Login validates a user credentials and issues a access/refresh token pair used to validate requests.

func (*Handler) Logout

Logout validates the access token and blocks it in the database for future attempts.

func (*Handler) RefreshToken

RefreshToken issues a new access/refresh token pair from the refresh token.

func (*Handler) Register

Register inserts new user in the namespace.

func (*Handler) ResetPassword

ResetPassword updates the users password if the provided code can be validated by the hash.

func (*Handler) SendPasswordReset

SendResetPasswordEmail sends an email to the user with a code used to reset his/her password.

func (*Handler) ServiceName

func (h *Handler) ServiceName() string

Jump to

Keyboard shortcuts

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