user

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BasePath is the base URI path for this module, minus the 'api' prefix
	BasePath = "/v1/user"
	// PasswordChangePath is the path for POSTing a password change request.
	PasswordChangePath = BasePath + "/password_change"
	// EmailChangePath is the path for POSTing an email address change request.
	EmailChangePath = BasePath + "/email_change"
)
View Source
const OIDCPasswordHelp = "" /* 154-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

func New

func New(processor *processing.Processor) *Module

func (*Module) EmailChangePOSTHandler added in v0.16.0

func (m *Module) EmailChangePOSTHandler(c *gin.Context)

EmailChangePOSTHandler swagger:operation POST /api/v1/user/email_change userEmailChange

Request changing the email address of authenticated user.

---
tags:
- user

consumes:
- application/json
- application/xml
- application/x-www-form-urlencoded

produces:
- application/json

security:
- OAuth2 Bearer:
	- write:user

responses:
	'202':
		description: "Accepted: email change is processing; check your inbox to confirm new address."
		schema:
			"$ref": "#/definitions/user"
	'400':
		description: bad request
	'401':
		description: unauthorized
	'403':
		description: forbidden
	'406':
		description: not acceptable
	'409':
		description: "Conflict: desired email address already in use"
	'500':
		description: internal error

func (*Module) PasswordChangePOSTHandler

func (m *Module) PasswordChangePOSTHandler(c *gin.Context)

PasswordChangePOSTHandler swagger:operation POST /api/v1/user/password_change userPasswordChange

Change the password of authenticated user.

The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'.

---
tags:
- user

consumes:
- application/json
- application/xml
- application/x-www-form-urlencoded

produces:
- application/json

security:
- OAuth2 Bearer:
	- write:user

responses:
	'200':
		description: Change successful
	'400':
		description: bad request
	'401':
		description: unauthorized
	'403':
		description: forbidden
	'406':
		description: not acceptable
	'422':
		description: unprocessable request because instance is running with OIDC backend
	'500':
		description: internal error

func (*Module) Route

func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes)

func (*Module) UserGETHandler added in v0.16.0

func (m *Module) UserGETHandler(c *gin.Context)

UserGETHandler swagger:operation GET /api/v1/user getUser

Get your own user model.

---
tags:
- user

produces:
- application/json

security:
- OAuth2 Bearer:
	- read:user

responses:
	'200':
		description: The requested user.
		schema:
			"$ref": "#/definitions/user"
	'400':
		description: bad request
	'401':
		description: unauthorized
	'403':
		description: forbidden
	'406':
		description: not acceptable
	'500':
		description: internal error

Jump to

Keyboard shortcuts

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