controllers

package
v0.0.0-...-d18f2d0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AlphaController

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

func NewAlphaController

func NewAlphaController(env lib.Env, db lib.Database) AlphaController

func (AlphaController) AddAccount

func (a AlphaController) AddAccount(ctx *gin.Context)

Add AlphaBank Account @Summary Authorize the use of the user's AlphaBank account @Description Use the URI to open AlphaBank's login page<br>You can find login credentials <a href="https://developer.api.alphabank.eu/getting-started/">here</a> @Tags Accounts @Router /v1/accounts/alpha [post] @Security BearerAuth @Success 200 {object} responses.AddBankAccountResponse @Failure 401 {object} responses.UnauthorizedError @Failure 500 {object} utils.HTTPError

func (AlphaController) AuthorizationCodeHook

func (a AlphaController) AuthorizationCodeHook(ctx *gin.Context)

type EurobankController

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

func NewEurobankController

func NewEurobankController(env lib.Env, db lib.Database) EurobankController

func (EurobankController) AddAccount

func (e EurobankController) AddAccount(ctx *gin.Context)

Add Eurobank Account @Summary Authorize the use of the user's Eurobank account @Description Use the URI to open Eurobank's login page<br>You can find login credentials <a href="https://developer.eurobank.gr/eurobank/apis/support">here</a> under "Which users can be used to log-in to sandbox environment?" @Tags Accounts @Router /v1/accounts/eurobank [post] @Security BearerAuth @Success 200 {object} responses.AddBankAccountResponse @Failure 401 {object} responses.UnauthorizedError @Failure 500 {object} utils.HTTPError

func (EurobankController) AuthorizationCodeHook

func (e EurobankController) AuthorizationCodeHook(ctx *gin.Context)

type PiraeusbankController

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

func NewPiraeusbankController

func NewPiraeusbankController(env lib.Env, db lib.Database) PiraeusbankController

func (PiraeusbankController) AddAccount

func (p PiraeusbankController) AddAccount(ctx *gin.Context)

Add Piraeusbank Account @Summary Authorize the use of the user's Piraeusbank account @Description Use the URI to open Piraeusbank's login page<br>You can find login credentials <a href="https://rapidlink.piraeusbank.gr/node/2059">here</a> @Tags Accounts @Router /v1/accounts/piraeusbank [post] @Security BearerAuth @Success 200 {object} responses.AddBankAccountResponse @Failure 401 {object} responses.UnauthorizedError @Failure 500 {object} utils.HTTPError

func (PiraeusbankController) AuthorizationCodeHook

func (p PiraeusbankController) AuthorizationCodeHook(ctx *gin.Context)

type UserController

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

func NewUserController

func NewUserController(
	db lib.Database,
	redis lib.Redis,
	authService services.AuthService,
	sms sms.SMSProvider,
) UserController

func (UserController) AuthenticateUser

func (u UserController) AuthenticateUser(ctx *gin.Context)

Login @Summary Get access and refresh tokens for user @Tags User @Description If the user has enabled TwoFa the result will have a verification ID for the verify route, else the access and refresh tokens are returned @Router /login [post] @Param data body models.UserLoginCredentials true "User credentials" @Success 200 {object} responses.LoginResponse @Failure 401 {object} utils.HTTPError @Failure 500 {object} utils.HTTPError

func (UserController) CreateUser

func (u UserController) CreateUser(ctx *gin.Context)

Register User @Summary Register a new User @Tags User @Router /register [post] @Param data body models.User true "User info" @Success 200 {object} responses.LoginResponse @Failure 500 {object} utils.HTTPError

func (UserController) LogoutUser

func (u UserController) LogoutUser(ctx *gin.Context)

Logout @Summary Invalidate User tokens @Tags User @Router /logout [post] @Security BearerAuth @Success 200 {object} responses.SuccessResponse @Failure 401 {object} responses.UnauthorizedError @Failure 500 {object} utils.HTTPError

func (UserController) RefreshTokens

func (u UserController) RefreshTokens(ctx *gin.Context)

Refresh Tokens @Summary Get a new access and refresh tokens @Tags User @Router /refresh [post] @Param refresh_token query string true "Refresh token provided by login" @Success 200 {object} responses.TokenResponse @Failure 500 {object} utils.HTTPError

func (UserController) ValidateCode

func (u UserController) ValidateCode(ctx *gin.Context)

Two Factor Authentication @Summary Verify a user login with a twofa code @Tags User @Router /verify [post] @Param verification_id query string true "Verification ID provided by login" @Param code query string true "TwoFactor authentication code" @Success 200 {object} responses.TokenResponse @Failure 401 {object} utils.HTTPError @Failure 500 {object} utils.HTTPError

Jump to

Keyboard shortcuts

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