auths

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	TokenType    string `json:"token_type"   enum:"Basic,Bearer"` // (required)
	AccessToken  string `json:"access_token"`                     // (required)
	ExpiresIn    int    `json:"expires_in,omitempty"`             // (recommended)
	RefreshToken string `json:"refresh_token,omitempty"`          // (optional)
	Scope        string `json:"scope,omitempty"`                  // (optional)
}

type AuthProperty

type AuthProperty struct {
	ClusterUuid   string `json:"cluster_uuid,omitempty"`   //cluster uuid
	Assertion     string `json:"assertion,omitempty"`      //<bearer-token>
	ClientVersion string `json:"client_version,omitempty"` //client version

}

Auth Property

type HttpReqAuth

type HttpReqAuth struct {
	AuthProperty `json:",inline"` //inline property
}

HttpReqAuth

type HttpReq_ServiceAccessToken

type HttpReq_ServiceAccessToken = ServiceAccessTokenRequest

type HttpRsp_AccessTokenResponse

type HttpRsp_AccessTokenResponse = AccessTokenResponse

type ServiceAccessTokenRequest

type ServiceAccessTokenRequest struct {
	Tenant string `json:"tenant"` // tenant
}

type TenantAccessTokenClaims

type TenantAccessTokenClaims struct {
	ID     int64  `json:"id,omitempty"`     // pk
	Hash   string `json:"hash,omitempty"`   // sha1(tenant)
	Tenant string `json:"tenant,omitempty"` // tenant

	ExpiresAt int64 `json:"exp,omitempty"` // expiration_time
	IssuedAt  int64 `json:"iat,omitempty"` // issued_at_time
}

func (TenantAccessTokenClaims) Valid

func (claims TenantAccessTokenClaims) Valid() error

func (TenantAccessTokenClaims) VerifyExpiresAt

func (claims TenantAccessTokenClaims) VerifyExpiresAt(cmp int64, req bool) bool

func (TenantAccessTokenClaims) VerifyIssuedAt

func (claims TenantAccessTokenClaims) VerifyIssuedAt(cmp int64, req bool) bool

Jump to

Keyboard shortcuts

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