auth

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtAccessToken

type JwtAccessToken struct {
	ID                string `json:"id" bson:"_id"`
	UserID            string `json:"user_id" bson:"user_id"`
	JwtRefreshTokenID string `json:"jwt_refresh_token_id" bson:"jwt_refresh_token_id"`
	CreatedAt         string `json:"created_at" bson:"created_at"`
	ExpiresAt         string `json:"expires_at" bson:"expires_at"`
	RevokedAt         string `json:"revoked_at,omitempty" bson:"revoked_at,omitempty"`
}

JwtAccessToken is the struct for the JWT access token

type JwtAccessTokenLog

type JwtAccessTokenLog struct {
	ID               string `json:"id" bson:"_id"`
	JwtAccessTokenID string `json:"jwt_access_token_id" bson:"jwt_access_token_id"`
	IPv4Address      string `json:"ipv4_address" bson:"ipv4_address"`
	UsedAt           string `json:"used_at" bson:"used_at"`
}

JwtAccessTokenLog is the struct for the JWT access token log

type JwtRefreshToken

type JwtRefreshToken struct {
	ID                   string `json:"id" bson:"_id"`
	UserID               string `json:"user_id" bson:"user_id"`
	UserLogInAttemptID   string `json:"user_log_in_attempt_id" bson:"user_log_in_attempt_id"`
	ParentRefreshTokenID string `json:"parent_refresh_token_id" bson:"parent_refresh_token_id"`
	CreatedAt            string `json:"created_at" bson:"created_at"`
	ExpiresAt            string `json:"expires_at" bson:"expires_at"`
	RevokedAt            string `json:"revoked_at,omitempty" bson:"revoked_at,omitempty"`
}

JwtRefreshToken is the struct for the JWT refresh token

type JwtRefreshTokenLog

type JwtRefreshTokenLog struct {
	ID                string `json:"id" bson:"_id"`
	JwtRefreshTokenID string `json:"jwt_refresh_token_id" bson:"jwt_refresh_token_id"`
	IPv4Address       string `json:"ipv4_address" bson:"ipv4_address"`
	UsedAt            string `json:"used_at" bson:"used_at"`
}

JwtRefreshTokenLog is the struct for the JWT refresh token log

type Permission

type Permission struct {
	ID              string `json:"id" bson:"_id"`
	CreatedByUserID string `json:"created_by_user_id" bson:"created_by_user_id"`
	RevokedByUserID string `json:"revoked_by_user_id,omitempty" bson:"revoked_by_user_id,omitempty"`
	Action          string `json:"action" bson:"action"`
	Resource        string `json:"resource" bson:"resource"`
	CreatedAt       string `json:"created_at" bson:"created_at"`
	RevokedAt       string `json:"revoked_at,omitempty" bson:"revoked_at,omitempty"`
	Description     string `json:"description" bson:"description"`
}

Permission is the struct for the permission

type Role

type Role struct {
	ID              string `json:"id" bson:"_id"`
	CreatedByUserID string `json:"created_by_user_id" bson:"created_by_user_id"`
	RevokedByUserID string `json:"revoked_by_user_id,omitempty" bson:"revoked_by_user_id,omitempty"`
	Name            string `json:"name" bson:"name"`
	Description     string `json:"description" bson:"description"`
	CreatedAt       string `json:"created_at" bson:"created_at"`
	RevokedAt       string `json:"revoked_at,omitempty" bson:"revoked_at,omitempty"`
}

Role is the struct for the role

type RolePermission

type RolePermission struct {
	ID               string `json:"id" bson:"_id"`
	AssignedByUserID string `json:"assigned_by_user_id" bson:"assigned_by_user_id"`
	RevokedByUserID  string `json:"revoked_by_user_id,omitempty" bson:"revoked_by_user_id,omitempty"`
	RoleID           string `json:"role_id" bson:"role_id"`
	PermissionID     string `json:"permission_id" bson:"permission_id"`
	CreatedAt        string `json:"created_at" bson:"created_at"`
	RevokedAt        string `json:"revoked_at,omitempty" bson:"revoked_at,omitempty"`
}

RolePermission is the struct for the role permission

type UserLogInAttempt

type UserLogInAttempt struct {
	ID           string `json:"id" bson:"_id"`
	UserID       string `json:"user_id" bson:"user_id"`
	IPv4Address  string `json:"ipv4_address" bson:"ipv4_address"`
	AttemptedAt  string `json:"attempted_at" bson:"attempted_at"`
	IsSuccessful bool   `json:"is_successful" bson:"is_successful"`
}

UserLogInAttempt is the struct for the user log in attempt

type UserRole

type UserRole struct {
	ID               string `json:"id" bson:"_id"`
	UserID           string `json:"user_id" bson:"user_id"`
	RoleID           string `json:"role_id" bson:"role_id"`
	AssignedByUserID string `json:"assigned_by_user_id" bson:"assigned_by_user_id"`
	RevokedByUserID  string `json:"revoked_by_user_id,omitempty" bson:"revoked_by_user_id,omitempty"`
	AssignedAt       string `json:"assigned_at" bson:"assigned_at"`
	RevokedAt        string `json:"revoked_at,omitempty" bson:"revoked_at,omitempty"`
}

UserRole is the struct for the user role

Jump to

Keyboard shortcuts

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