webhandler

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyUserID         = "user_id"
	KeyServiceTokenID = "svc_token_id"
	KeyFullName       = "fullname"
	KeyAuthorized     = "authorized"
	KeyExpiresAt      = "expires_at"

	HeaderAuthorization = "Authorization"
	HeaderUserID        = "mc_userid"

	AccessToken = "access_token"

	DefaultTokenExpiration = time.Hour * 24 // 24 hours
	AUTH_COOKIE_NAME       = "__mc_auth"
	SIGNOUT_PATH           = "/api/mc_auth/sign_out"

	SecureShareDirWebHandlerPath   = "/secure_share"
	InsecureShareDirWebHandlerPath = "/insecure_share"
)

global constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionConfig

type ActionConfig struct {
	Resource string `json:"resource" yaml:"resource"`
	KayPath  string `json:"keyPath" yaml:"keyPath"`
	Payload  string `json:"payload" yaml:"payload"`
}

ActionConfig struct

type JwtToken

type JwtToken struct {
	ID    string `json:"id" yaml:"id"`
	Email string `json:"email" yaml:"email"`
}

JwtToken struct

type JwtTokenResponse

type JwtTokenResponse struct {
	ID       string `json:"id" yaml:"id"`
	Username string `json:"username" yaml:"username"`
	FullName string `json:"fullName" yaml:"fullName"`
	Email    string `json:"email" yaml:"email"`
	Token    string `json:"token" yaml:"token"`
}

JwtTokenResponse struct

type Response

type Response struct {
	Success bool        `json:"success" yaml:"success"`
	Message string      `json:"message" yaml:"message"`
	Data    interface{} `json:"data" yaml:"data"`
}

Response struct

type UserLogin

type UserLogin struct {
	Username  string `json:"username" yaml:"username"`
	Password  string `json:"password" yaml:"password"`
	SvcToken  string `json:"token" yaml:"token"`
	ExpiresIn string `json:"expiresIn" yaml:"expiresIn"`
}

UserLogin struct

Jump to

Keyboard shortcuts

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