core

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: GPL-3.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Header_Authorization          = "Authorization"
	Header_CacheControl           = "Cache-Control"
	Header_CacheControl_Value     = "no-store"
	Header_Pragma                 = "Pragma"
	Header_Pragma_Value           = "no-cache"
	ContentType_Json              = "application/json;charset=UTF-8"
	ContentType_Html              = "text/html;charset=utf-8"
	Claim_Role                    = "role"
	Claim_Name                    = "name"
	Claim_Audience                = "aud"
	Claim_Issuer                  = "iss"
	Claim_Subject                 = "sub"
	Claim_Expire                  = "exp"
	Claim_IssueAt                 = "iat"
	Claim_NotValidBefore          = "nbf"
	Claim_Scope                   = "scope"
	Claim_RefreshTokenExpire      = "rexp"
	Claim_Email                   = "email"
	Claim_Level                   = "level"
	Claim_Status                  = "status"
	Form_GrantType                = "grant_type"
	Form_ClientID                 = "client_id"
	Form_ClientSecret             = "client_secret"
	Form_RedirectUri              = "redirect_uri"
	Form_ReturnUrl                = "returnUrl"
	Form_State                    = "state"
	Form_EndSessionID             = "es_id"
	Form_Scope                    = "scope"
	Form_Code                     = "code"
	Form_Username                 = "username"
	Form_Password                 = "password"
	Form_ResponseType             = "response_type"
	Form_AccessToken              = "access_token"
	Form_RefreshToken             = "refresh_token"
	Form_TokenType                = "token_type"
	Form_TokenTypeBearer          = "Bearer"
	Form_ExpiresIn                = "expires_in"
	Form_CodeChallenge            = "code_challenge"
	Form_CodeChallengeMethod      = "code_challenge_method"
	Form_CodeVerifier             = "code_verifier"
	ResponseType_Token            = "token"
	ResponseType_Code             = "code"
	GrantType_Client              = "client_credentials"
	GrantType_AuthorizationCode   = "authorization_code"
	GrantType_Implicit            = "implicit"
	GrantType_ResourceOwner       = "password"
	GrantType_RefreshToken        = "refresh_token"
	Format_Token1                 = "{\"" + Form_AccessToken + "\":\"%s\",\"" + Form_ExpiresIn + "\":\"%d\",\"" + Form_Scope + "\":\"%s\",\"" + Form_TokenType + "\":\"" + Form_TokenTypeBearer + "\"}"
	Format_Token2                 = "{\"" + Form_AccessToken + "\":\"%s\",\"" + Form_RefreshToken + "\":\"%s\",\"" + Form_ExpiresIn + "\":\"%d\",\"" + Form_Scope + "\":\"%s\",\"" + Form_TokenType + "\":\"" + Form_TokenTypeBearer + "\"}"
	Format_Error                  = "{\"error\":\"%s\", \"error_description\":\"%s\"}"
	Msg_Success                   = ""
	Err_invalid_request           = "invalid_request"
	Err_invalid_client            = "invalid_client"
	Err_invalid_grant             = "invalid_grant"
	Err_unauthorized_client       = "unauthorized_client"
	Err_unsupported_grant_type    = "unsupported_grant_type"
	Err_unsupported_response_type = "unsupported_response_type"
	Err_invalid_scope             = "invalid_scope"
	Err_access_denied             = "access_denied"
	Err_description               = "error_description"
	Err_uri                       = "error_uri"
	Err_server_error              = "server_error"
	Pkce_Plain                    = "plain"
	Pkce_S256                     = "S256"
	Config_OAuth_PkceRequired     = "OAuth:PkceRequired"
	Token_Access                  = "access_token"
	Token_Refresh                 = "refresh_token"
	Token_ExpiresAt               = "expires_at"
	UtcTimesamp                   = "yyyy-MM-ddTHH:mm:ss.0000000+00:00"
	Seperator_Scope               = " "
	Seperators_Auth               = ":"
)

Variables

This section is empty.

Functions

func GenerateID

func GenerateID() string

GenerateID _

func Random64String

func Random64String() string

func Redirect

func Redirect(ctx *fasthttp.RequestCtx, url string)

func ToSHA256Base64URL

func ToSHA256Base64URL(in string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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