models

package
v0.0.0-...-25e8c23 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	//Roles which is used for RBAc
	Roles []string `json:"roles"`
}

Authorization contains all the roles of the user

type Claims

type Claims struct {
	Username      string        `json:"username"`
	UserID        string        `json:"user_id"`
	Authorization Authorization `json:"authorization"`
	jwt.StandardClaims
}

Claims contains the values for the claims part of the JWT

type DefaultLoginRequest

type DefaultLoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Username           string `json:"username"`
	UserID             string `json:"user_id"`
	AuthorizationToken string `json:"authorization_token"`
	RefreshToken       string `json:"refresh_token"`
}

type LogoutRequest

type LogoutRequest struct {
	AuthorizationToken string `json:"authorization_token"`
	RefreshToken       string `json:"refresh_token"`
}

Jump to

Keyboard shortcuts

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