userinfo

package
v0.0.0-...-f34f428 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPassword

func HashPassword(password string) ([]byte, error)

HashPassword accepts a plaintext password string and generates a salted hash

func Init

Init creates a new UserInfo

Types

type LocalUserInfo

type LocalUserInfo struct {
	// contains filtered or unexported fields
}

LocalUserInfo is a plugin to fetch user info

func (*LocalUserInfo) GetUserInfo

func (userInfo *LocalUserInfo) GetUserInfo(id string) (int, []byte, *http.Header, error)

GetUserInfo gets info for the specified user

func (*LocalUserInfo) UpdatePassword

func (userInfo *LocalUserInfo) UpdatePassword(id string, passwordInfo *passwordChangeInfo) (int, error)

UpdatePassword updates the user's password

func (*LocalUserInfo) UpdateUserInfo

func (userInfo *LocalUserInfo) UpdateUserInfo(profile *uaaUser) (int, error)

UpdateUserInfo updates the user's info

type NoAuthUserInfo

type NoAuthUserInfo struct {
	// contains filtered or unexported fields
}

NoAuthUserInfo is a plugin for no authentication

func (*NoAuthUserInfo) GetUserInfo

func (userInfo *NoAuthUserInfo) GetUserInfo(id string) (int, []byte, *http.Header, error)

GetUserInfo gets info for the specified user

func (*NoAuthUserInfo) UpdatePassword

func (userInfo *NoAuthUserInfo) UpdatePassword(id string, passwordInfo *passwordChangeInfo) (int, error)

UpdatePassword updates the user's password

func (*NoAuthUserInfo) UpdateUserInfo

func (userInfo *NoAuthUserInfo) UpdateUserInfo(profile *uaaUser) (int, error)

UpdateUserInfo updates the user's info

type Provider

type Provider interface {
	GetUserInfo(id string) (int, []byte, *http.Header, error)
	UpdateUserInfo(*uaaUser) (int, error)
	UpdatePassword(id string, info *passwordChangeInfo) (int, error)
}

Provider manages user info for a provider

func InitLocalUserInfo

func InitLocalUserInfo(portalProxy interfaces.PortalProxy) Provider

InitLocalUserInfo creates a new local user info provider

func InitNoAuthUserInfo

func InitNoAuthUserInfo(portalProxy interfaces.PortalProxy) Provider

InitNoAuthUserInfo creates a new no auth user info provider

func InitUaaUserInfo

func InitUaaUserInfo(portalProxy interfaces.PortalProxy, c echo.Context) Provider

InitUaaUserInfo creates a new UAA user info provider

type UaaUserInfo

type UaaUserInfo struct {
	// contains filtered or unexported fields
}

UaaUserInfo for UAA User Info

func (*UaaUserInfo) GetUserInfo

func (userInfo *UaaUserInfo) GetUserInfo(id string) (int, []byte, *http.Header, error)

GetUserInfo gets info for the specified user

func (*UaaUserInfo) UpdatePassword

func (userInfo *UaaUserInfo) UpdatePassword(id string, passwordInfo *passwordChangeInfo) (int, error)

UpdatePassword updates the user's password

func (*UaaUserInfo) UpdateUserInfo

func (userInfo *UaaUserInfo) UpdateUserInfo(profile *uaaUser) (int, error)

UpdateUserInfo updates the user's info

type UserInfo

type UserInfo struct {
	// contains filtered or unexported fields
}

UserInfo is a plugin to fetch user info from the UAA

func (*UserInfo) AddAdminGroupRoutes

func (userInfo *UserInfo) AddAdminGroupRoutes(echoGroup *echo.Group)

AddAdminGroupRoutes adds the admin routes for this plugin to the Echo server

func (*UserInfo) AddSessionGroupRoutes

func (userInfo *UserInfo) AddSessionGroupRoutes(echoGroup *echo.Group)

AddSessionGroupRoutes adds the session routes for this plugin to the Echo server

func (*UserInfo) GetEndpointPlugin

func (userInfo *UserInfo) GetEndpointPlugin() (interfaces.EndpointPlugin, error)

GetEndpointPlugin gets the endpoint plugin for this plugin

func (*UserInfo) GetMiddlewarePlugin

func (userInfo *UserInfo) GetMiddlewarePlugin() (interfaces.MiddlewarePlugin, error)

GetMiddlewarePlugin gets the middleware plugin for this plugin

func (*UserInfo) GetRoutePlugin

func (userInfo *UserInfo) GetRoutePlugin() (interfaces.RoutePlugin, error)

GetRoutePlugin gets the route plugin for this plugin

func (*UserInfo) Init

func (userInfo *UserInfo) Init() error

Init performs plugin initialization

Jump to

Keyboard shortcuts

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