userinfo

package
v0.0.0-...-447887d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Init(portalProxy api.PortalProxy) (api.StratosPlugin, error)

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 api.PortalProxy) Provider

InitLocalUserInfo creates a new local user info provider

func InitNoAuthUserInfo

func InitNoAuthUserInfo(portalProxy api.PortalProxy) Provider

InitNoAuthUserInfo creates a new no auth user info provider

func InitUaaUserInfo

func InitUaaUserInfo(portalProxy api.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() (api.EndpointPlugin, error)

GetEndpointPlugin gets the endpoint plugin for this plugin

func (*UserInfo) GetMiddlewarePlugin

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

GetMiddlewarePlugin gets the middleware plugin for this plugin

func (*UserInfo) GetRoutePlugin

func (userInfo *UserInfo) GetRoutePlugin() (api.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