authlib

package module
v0.0.0-...-6e2e6a1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 11 Imported by: 0

README

AuthLib Library

The AuthLib Client Library is a Go package designed to provide a streamlined and efficient way to interact with the Sky-Auth Authentication server. This package provides an HTTP client along with associated methods and data types to handle the following functionalities:

  1. Service Account Registration: It provides the ability to register new service accounts. A service account is created with a specified name and a set of roles.
  2. Service Account Authentication: The library can authenticate a service account using the account ID and secret key, returning a JWT token upon successful authentication.
  3. User Authentication Verification: The library can verify the authentication status of a user using a provided JWT token. It sends a GET request to the '/is-authenticated' endpoint of the authentication server.
  4. User Authorization Verification: The library can also verify a user's authorization to perform a specific action using a provided JWT token and a permission string.

All the functionalities make use of the Sky-Auth Authentication server's API endpoints and expect responses in specific JSON formats.

It also comes with built-in error handling and provides custom error types for each function, such as CheckUserAuthorizationError, VerifyUserAuthenticationError, AuthenticateServiceAccountError, and RegisterServiceAccountError.

This library is designed to be simple, robust, and easily integratable into any Go project that needs to interact with the Sky-Auth Authentication server. It emphasizes on ease of use and readability while maintaining strong typing and error handling typical in Go codebases.

Installation

go get github.com/PiccoloMondoC/authlib

Usage

Firstly, you need to create a new authlib.Client instance.

import "github.com/PiccoloMondoC/authlib"

client := authlib.NewClient(baseURL, logger)

Register a Service Account

accountID, secret, err := client.RegisterServiceAccount(context.Background(), "account-name", []string{"role1", "role2"})
if err != nil {
	// handle error
}

This function will register a new service account with the provided name and roles. The function will return the accountID and secret of the newly created account.

Authenticate a Service Account

token, err := client.AuthenticateServiceAccount(context.Background(), accountID, secret)
if err != nil {
	// handle error
}

This function will authenticate a service account using its accountID and secretKey and return a JWT token if successful.

Verify User Authentication

isAuthenticated, err := client.VerifyUserAuthentication(context.Background(), token)
if err != nil {
	// handle error
}

This function verifies a JWT token and returns a boolean value indicating whether the token is valid.

Check User Authorization

hasPermission, err := client.CheckUserAuthorization(context.Background(), token, "permission")
if err != nil {
	// handle error
}

This function verifies a user's authorization to perform a certain action (specified by the permission argument) and returns a boolean value indicating whether the user has the required permissions.

Error Handling

All the functions will return an error in case of a failure. The returned errors will be of the following types:

  • CheckUserAuthorizationError
  • VerifyUserAuthenticationError
  • AuthenticateServiceAccountError
  • RegisterServiceAccountError

These are custom error types that contain the base error and the status code returned from the SkyAuth server.

Logging

All the operations are logged using the provided logger; not included here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	ID               uuid.UUID `json:"id"`
	ServiceAccountID uuid.UUID `json:"service_account_id"`
	APIKey           string    `json:"api_key"`
	CreatedAt        time.Time `json:"created_at"`
	UpdatedAt        time.Time `json:"updated_at"`
	Valid            bool      `json:"valid"`
	IsActive         bool      `json:"is_active"`
	ServiceName      string    `json:"service_name"`
}

type AssignServiceRoleToServiceAccountInput

type AssignServiceRoleToServiceAccountInput struct {
	ServiceAccountID uuid.UUID `json:"service_account_id"`
	ServiceRoleID    uuid.UUID `json:"service_role_id"`
	ApiKey           string    `json:"api_key,omitempty"` // Optional, for authentication
}

type AuthRequest

type AuthRequest struct {
	AccountID string `json:"account_id"`
	SecretKey string `json:"secret_key"`
}

type AuthResponse

type AuthResponse struct {
	Token string `json:"token"`
}

type AuthenticateServiceAccountError

type AuthenticateServiceAccountError struct {
	BaseError  error
	StatusCode int
}

func (*AuthenticateServiceAccountError) Error

type CheckRevokedInput

type CheckRevokedInput struct {
	TokenID uuid.UUID
	Ctx     context.Context
}

type Client

type Client struct {
	BaseURL    string
	HttpClient *http.Client
	ApiKey     string
}

Client represents an HTTP client that can be used to send requests to the authentication server.

func NewClient

func NewClient(baseURL string, apiKey string, httpClient ...*http.Client) *Client

func (*Client) AssignServicePermissionToServiceRole

func (c *Client) AssignServicePermissionToServiceRole()

func (*Client) AssignServiceRoleToServiceAccount

func (c *Client) AssignServiceRoleToServiceAccount(ctx context.Context, input AssignServiceRoleToServiceAccountInput) (*ServiceAccount, error)

func (*Client) BlacklistToken

func (c *Client) BlacklistToken()

func (*Client) ClearBlacklist

func (c *Client) ClearBlacklist()

func (*Client) CountBlacklistedTokens

func (c *Client) CountBlacklistedTokens()

func (*Client) CreateAPIKey

func (c *Client) CreateAPIKey(apiKey APIKey) (APIKey, error)

func (*Client) CreateRefreshToken

func (c *Client) CreateRefreshToken(ctx context.Context, input CreateRefreshTokenInput) (*RefreshToken, error)

CreateRefreshToken creates a new refresh token

func (*Client) CreateServicePermission

func (c *Client) CreateServicePermission()

func (*Client) CreateServiceRole

func (c *Client) CreateServiceRole(ctx context.Context, input CreateServiceRoleInput) (*ServiceRole, error)

func (*Client) CreateTemporaryData

func (c *Client) CreateTemporaryData()

func (*Client) DecodeAccessToken

func (c *Client) DecodeAccessToken()

func (*Client) DeleteAPIKey

func (c *Client) DeleteAPIKey(id uuid.UUID) error

DeleteAPIKey deletes the APIKey with the given id.

func (*Client) DeleteExpiredRefreshTokens

func (c *Client) DeleteExpiredRefreshTokens(ctx context.Context, input DeleteExpiredRefreshTokensInput) error

func (*Client) DeleteExpiredTemporaryData

func (c *Client) DeleteExpiredTemporaryData()

func (*Client) DeleteServiceAccount

func (c *Client) DeleteServiceAccount(ctx context.Context, serviceAccountID uuid.UUID, apiKey string) error

func (*Client) DeleteServicePermission

func (c *Client) DeleteServicePermission()

func (*Client) DeleteServiceRole

func (c *Client) DeleteServiceRole(ctx context.Context, roleID uuid.UUID) error

func (*Client) DeleteTemporaryData

func (c *Client) DeleteTemporaryData()

func (*Client) DoesServicePermissionExist

func (c *Client) DoesServicePermissionExist()

func (*Client) DoesServiceRoleExist

func (c *Client) DoesServiceRoleExist()

func (*Client) FetchPrivateKey

func (c *Client) FetchPrivateKey(ctx context.Context, input FetchPrivateKeyInput) ([]byte, error)

func (*Client) GenerateAccessToken

func (c *Client) GenerateAccessToken()

func (*Client) GetAPIKeyByAPIKey

func (c *Client) GetAPIKeyByAPIKey(apiKey string) (*APIKey, error)

func (*Client) GetAPIKeyByID

func (c *Client) GetAPIKeyByID(id uuid.UUID) (*APIKey, error)

func (*Client) GetBlacklistedTokenDetails

func (c *Client) GetBlacklistedTokenDetails()

func (*Client) GetRefreshToken

func (c *Client) GetRefreshToken(ctx context.Context, input GetRefreshTokenInput) (*RefreshToken, error)

GetRefreshToken fetches the refresh token from the auth server.

func (*Client) GetRefreshTokensForUser

func (c *Client) GetRefreshTokensForUser(ctx context.Context, input GetRefreshTokensForUserInput) ([]RefreshToken, error)

GetRefreshTokensForUser sends a request to the authentication server to get all refresh tokens for a specific user.

func (*Client) GetRolesForServiceAccount

func (c *Client) GetRolesForServiceAccount(ctx context.Context, input GetRolesForServiceAccountInput) ([]string, error)

func (*Client) GetServiceAccountByAPIKey

func (c *Client) GetServiceAccountByAPIKey(ctx context.Context, apiKey string) (*ServiceAccount, error)

func (*Client) GetServiceAccountByID

func (c *Client) GetServiceAccountByID(ctx context.Context, serviceAccountID uuid.UUID) (*ServiceAccount, error)

func (*Client) GetServiceAccountByName

func (c *Client) GetServiceAccountByName(ctx context.Context, serviceName string, apiKey string) (*ServiceAccount, error)

func (*Client) GetServiceAccountTokenMetadata

func (c *Client) GetServiceAccountTokenMetadata(ctx context.Context, input GetServiceAccountTokenMetadataInput) (*ServiceAccountToken, error)

func (*Client) GetServiceAccountsByServiceRoleID

func (c *Client) GetServiceAccountsByServiceRoleID(ctx context.Context, serviceRoleID uuid.UUID) ([]ServiceAccount, error)

func (*Client) GetServicePermissionByID

func (c *Client) GetServicePermissionByID()

func (*Client) GetServicePermissionByName

func (c *Client) GetServicePermissionByName()

func (*Client) GetServicePermissionsByServiceID

func (c *Client) GetServicePermissionsByServiceID()

func (*Client) GetServicePermissionsByServiceRoleIDInServicePermissionModel

func (c *Client) GetServicePermissionsByServiceRoleIDInServicePermissionModel()

func (*Client) GetServicePermissionsByServiceRoleIDInServiceRoleServicePermissionsModel

func (c *Client) GetServicePermissionsByServiceRoleIDInServiceRoleServicePermissionsModel()

func (*Client) GetServiceRoleByID

func (c *Client) GetServiceRoleByID(ctx context.Context, id uuid.UUID) (*ServiceRole, error)

func (*Client) GetServiceRoleByName

func (c *Client) GetServiceRoleByName(ctx context.Context, name string) (*ServiceRole, error)

func (*Client) GetServiceRoleIDByName

func (c *Client) GetServiceRoleIDByName(ctx context.Context, name string) (*uuid.UUID, error)

func (*Client) GetServiceRolesByServiceAccountIDInServiceAccountModel

func (c *Client) GetServiceRolesByServiceAccountIDInServiceAccountModel(ctx context.Context, serviceAccountID uuid.UUID) ([]uuid.UUID, error)

sky-auth/pkg/clientlib/authlib/service_accounts.go

func (*Client) GetServiceRolesByServiceAccountIDInServiceRoleModel

func (c *Client) GetServiceRolesByServiceAccountIDInServiceRoleModel()

func (*Client) GetServiceRolesByServicePermissionID

func (c *Client) GetServiceRolesByServicePermissionID()

func (*Client) GetTemporaryData

func (c *Client) GetTemporaryData()

func (*Client) GetTokenForUser

func (c *Client) GetTokenForUser(ctx context.Context, account UserAccount) (string, error)

GetTokenForUser sends a request to the auth server to get a token for an account (user or service account).

func (*Client) InvalidateServiceAccountToken

func (c *Client) InvalidateServiceAccountToken(ctx context.Context, input InvalidateServiceAccountTokenInput) error

func (*Client) IsRefreshTokenRevoked

func (c *Client) IsRefreshTokenRevoked(input CheckRevokedInput) (bool, error)

func (*Client) IsServicePermissionAssignedToServiceRole

func (c *Client) IsServicePermissionAssignedToServiceRole()

func (*Client) IsServiceRoleAssignedToServiceAccount

func (c *Client) IsServiceRoleAssignedToServiceAccount(ctx context.Context, input IsServiceRoleAssignedToServiceAccountInput) (bool, error)

func (*Client) IsTokenBlacklisted

func (c *Client) IsTokenBlacklisted()

func (*Client) IssueServiceAccountToken

func (c *Client) IssueServiceAccountToken(ctx context.Context, input IssueServiceAccountTokenInput) (*ServiceAccountToken, error)

func (*Client) ListAPIKeys

func (c *Client) ListAPIKeys() ([]APIKey, error)

ListAPIKeys retrieves all API keys.

func (*Client) ListBlacklistedTokens

func (c *Client) ListBlacklistedTokens()

func (*Client) ListServiceAccountTokens

func (c *Client) ListServiceAccountTokens(ctx context.Context, input ListServiceAccountTokensInput) ([]ServiceAccountToken, error)

func (*Client) ListServiceAccounts

func (c *Client) ListServiceAccounts(ctx context.Context) ([]ServiceAccount, error)

func (*Client) ListServicePermissions

func (c *Client) ListServicePermissions()

func (*Client) ListServiceRoles

func (c *Client) ListServiceRoles(ctx context.Context) (*ListServiceRolesOutput, error)

func (*Client) ListTemporaryData

func (c *Client) ListTemporaryData()

func (*Client) Login

func (c *Client) Login(ctx context.Context, input LoginInput) (*LoginOutput, error)

Login sends a request to the login endpoint and returns an access token and refresh token on successful login

func (*Client) RefreshServiceAccountToken

func (c *Client) RefreshServiceAccountToken(ctx context.Context, input RefreshServiceAccountTokenInput) (*TokenDetails, error)

func (*Client) RemoveServicePermissionFromServiceRole

func (c *Client) RemoveServicePermissionFromServiceRole()

func (*Client) RemoveServiceRoleFromServiceAccount

func (c *Client) RemoveServiceRoleFromServiceAccount(ctx context.Context, serviceAccountID uuid.UUID, serviceRoleID uuid.UUID) error

func (*Client) RemoveTokenFromBlacklist

func (c *Client) RemoveTokenFromBlacklist()

func (*Client) RequestServiceAccountRegistration

func (c *Client) RequestServiceAccountRegistration(ctx context.Context, input RequestServiceAccountRegistrationInput) (*ServiceAccount, error)

func (*Client) RevokeAllRefreshTokensForUser

func (c *Client) RevokeAllRefreshTokensForUser(ctx context.Context, input RevokeAllRefreshTokensInput) error

func (*Client) RevokeRefreshToken

func (c *Client) RevokeRefreshToken(input RevokeRefreshTokenInput) error

RevokeRefreshToken revokes a refresh token by sending a POST request to the auth server.

func (*Client) SaveServiceAccountKey

func (c *Client) SaveServiceAccountKey(ctx context.Context, input SaveServiceAccountKeyInput) (*ServiceAccountKey, error)

func (*Client) SignData

func (c *Client) SignData(ctx context.Context, input SignDataInput) (*SignDataOutput, error)

func (*Client) UpdateAPIKey

func (c *Client) UpdateAPIKey(key *APIKey) (*APIKey, error)

func (*Client) UpdateServiceAccount

func (c *Client) UpdateServiceAccount(ctx context.Context, input UpdateServiceAccountInput) (*ServiceAccount, error)

func (*Client) UpdateServicePermission

func (c *Client) UpdateServicePermission()

func (*Client) UpdateServiceRole

func (c *Client) UpdateServiceRole(ctx context.Context, input UpdateServiceRoleInput) (*ServiceRole, error)

func (*Client) UpdateTemporaryData

func (c *Client) UpdateTemporaryData()

func (*Client) ValidateAPIKey

func (c *Client) ValidateAPIKey(apikey string) (bool, error)

ValidateAPIKey validates an API key.

func (*Client) ValidateAccessToken

func (c *Client) ValidateAccessToken()

func (*Client) ValidateRefreshToken

func (c *Client) ValidateRefreshToken(ctx context.Context, input ValidateRefreshTokenInput) (bool, error)

func (*Client) VerifyServiceAccountToken

func (c *Client) VerifyServiceAccountToken(ctx context.Context, input VerifyServiceAccountTokenInput) (bool, error)

type CreateRefreshTokenInput

type CreateRefreshTokenInput struct {
	UserID    uuid.UUID `json:"user_id"`
	ExpiresAt time.Time `json:"expires_at"`
}

CreateRefreshTokenInput represents the required input to create a refresh token

type CreateServiceRoleInput

type CreateServiceRoleInput struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type DeleteExpiredRefreshTokensInput

type DeleteExpiredRefreshTokensInput struct {
	Before time.Time `json:"before"`
}

DeleteExpiredRefreshTokensInput represents the input for DeleteExpiredRefreshTokens

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

ErrorResponse represents the structure of an error response

type FetchPrivateKeyInput

type FetchPrivateKeyInput struct {
	ServiceAccountID uuid.UUID `json:"service_account_id"`
}

FetchPrivateKeyInput represents the required input to fetch a service account key

type GetRefreshTokenInput

type GetRefreshTokenInput struct {
	TokenID uuid.UUID `json:"token_id"`
}

GetRefreshTokenInput defines the input for GetRefreshToken function.

type GetRefreshTokensForUserInput

type GetRefreshTokensForUserInput struct {
	UserID uuid.UUID
}

GetRefreshTokensForUserInput represents the input parameters for the GetRefreshTokensForUser function.

type GetRolesForServiceAccountInput

type GetRolesForServiceAccountInput struct {
	ServiceAccountID uuid.UUID `json:"service_account_id"`
	ApiKey           string    `json:"api_key,omitempty"` // Optional, if you want to include an ApiKey
}

type GetServiceAccountTokenMetadataInput

type GetServiceAccountTokenMetadataInput struct {
	ServiceAccountTokenID uuid.UUID `json:"service_account_token_id"`
}

GetServiceAccountTokenMetadataInput represents the required input to get a service account token metadata

type InvalidateServiceAccountTokenInput

type InvalidateServiceAccountTokenInput struct {
	ServiceAccountTokenID uuid.UUID `json:"service_account_token_id"`
}

InvalidateServiceAccountTokenInput represents the required input to invalidate a service account token

type IsRevokedResponse

type IsRevokedResponse struct {
	IsRevoked bool `json:"is_revoked"`
}

type IsServiceRoleAssignedToServiceAccountInput

type IsServiceRoleAssignedToServiceAccountInput struct {
	ServiceRoleID    uuid.UUID `json:"service_role_id"`
	ServiceAccountID uuid.UUID `json:"service_account_id"`
}

type IssueServiceAccountTokenInput

type IssueServiceAccountTokenInput struct {
	ServiceAccountID uuid.UUID `json:"service_account_id"`
}

IssueServiceAccountTokenInput represents the required input to issue a service account token

type ListServiceAccountTokensInput

type ListServiceAccountTokensInput struct {
	ServiceAccountID uuid.UUID `json:"service_account_id,omitempty"` // optional
}

ListServiceAccountTokensInput represents the required input to list service account tokens

type ListServiceRolesOutput

type ListServiceRolesOutput struct {
	ServiceRoles []ServiceRole `json:"service_roles"`
}

ListServiceRolesOutput is the response structure for listing service roles

type LoginInput

type LoginInput struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

LoginInput represents the data required for login

type LoginOutput

type LoginOutput struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

LoginOutput represents the data returned after successful login

type RefreshServiceAccountTokenInput

type RefreshServiceAccountTokenInput struct {
	ServiceAccountTokenID uuid.UUID `json:"service_account_token_id"`
	RefreshToken          string    `json:"refresh_token"`
}

RefreshServiceAccountTokenInput represents the required input to refresh a service account token

type RefreshToken

type RefreshToken struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	TokenHash []byte    `json:"token_hash"`
	IssuedAt  time.Time `json:"issued_at"`
	ExpiresAt time.Time `json:"expires_at"`
	IsRevoked bool      `json:"is_revoked"`
}

RefreshToken represents the structure of a refresh token

type RequestServiceAccountRegistrationInput

type RequestServiceAccountRegistrationInput struct {
	ServiceName    string `json:"service_name"`
	ApiKey         string `json:"api_key,omitempty"`         // Optional, if you want to include an ApiKey
	BootstrapToken string `json:"bootstrap_token,omitempty"` // Optional, if you want to include a BootstrapToken
}

type RevokeAllRefreshTokensInput

type RevokeAllRefreshTokensInput struct {
	UserID uuid.UUID
}

type RevokeRefreshTokenInput

type RevokeRefreshTokenInput struct {
	Context        context.Context
	RefreshTokenID uuid.UUID
}

RevokeRefreshTokenInput represents the input parameters for RevokeRefreshToken function

type SaveServiceAccountKeyInput

type SaveServiceAccountKeyInput struct {
	ServiceAccountID uuid.UUID `json:"service_account_id"`
}

SaveServiceAccountKeyInput represents the required input to save a service account key

type ServiceAccount

type ServiceAccount struct {
	ID           uuid.UUID  `db:"id" json:"id"`
	Secret       string     `db:"secret" json:"-"`
	HashedSecret string     `json:"hashed_secret"`
	ServiceName  string     `db:"service_name" json:"service_name"`
	ServiceRoles []string   `json:"service_roles"`
	CreatedAt    time.Time  `db:"created_at" json:"created_at"`
	ExpiresAt    *time.Time `db:"expires_at" json:"expires_at,omitempty"`
	IsActive     bool       `json:"is_active"`
	APIKey       string     `json:"-"` // Omit API Key in JSON responses by default.
	AccessToken  string     `json:"-"` // Omit AccessToken in JSON responses by default.
	RefreshToken string     `json:"-"` // Omit RefreshToken in JSON responses by default.
}

type ServiceAccountKey

type ServiceAccountKey struct {
	ID               uuid.UUID `json:"id"`
	ServiceAccountID uuid.UUID `json:"service_account_id"`
	PublicKey        []byte    `json:"public_key"`
	PrivateKey       []byte    `json:"private_key"`
	CreatedAt        time.Time `json:"created_at"`
}

ServiceAccountKey represents the structure of a service account key

type ServiceAccountToken

type ServiceAccountToken struct {
	ID                    uuid.UUID `json:"id"`
	ServiceAccountID      uuid.UUID `json:"service_account_id"`
	Token                 string    `json:"token"`
	RefreshToken          string    `json:"refresh_token"`
	IssuedAt              time.Time `json:"issued_at"`
	TokenExpiresAt        time.Time `json:"token_expires_at"`
	RefreshTokenExpiresAt time.Time `json:"refresh_token_expires_at"`
}

ServiceAccountToken represents the structure of a service account token

type ServiceRole

type ServiceRole struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
}

type SignDataInput

type SignDataInput struct {
	ServiceAccountID uuid.UUID `json:"service_account_id"`
	Data             []byte    `json:"data"`
}

SignDataInput represents the required input to sign data

type SignDataOutput

type SignDataOutput struct {
	Signature []byte `json:"signature"`
}

SignDataOutput represents the response from the sign data API

type TemporaryData

type TemporaryData struct {
	ID        uuid.UUID `json:"id"`
	Data      []byte    `json:"data"`
	CreatedAt time.Time `json:"created_at"`
	ExpiresAt time.Time `json:"expires_at"`
}

TemporaryData represents the structure of a temporary data entry

type TokenBlacklist

type TokenBlacklist struct {
	Token     []byte    `json:"token"`
	CreatedAt time.Time `json:"created_at"`
}

TokenBlacklist represents the structure of a blacklisted token

type TokenDetails

type TokenDetails struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	AtExpires    int64  `json:"at_expires"`
	RtExpires    int64  `json:"rt_expires"`
}

TokenDetails represents the structure of issued tokens and their expiry details

type TokenService

type TokenService struct {
	PrivateKey ed25519.PrivateKey
	TokenTTL   time.Duration
}

type UpdateServiceAccountInput

type UpdateServiceAccountInput struct {
	ServiceAccount *ServiceAccount `json:"service_account"`
	ApiKey         string          `json:"api_key,omitempty"` // Optional, if you want to include an ApiKey
}

type UpdateServiceRoleInput

type UpdateServiceRoleInput struct {
	ID          uuid.UUID `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
}

type UserAccount

type UserAccount interface {
	GetAccountID() string
	GetCredentials() string
}

Account represents an entity (user or service account) that can authenticate.

type ValidateRefreshTokenInput

type ValidateRefreshTokenInput struct {
	RefreshTokenID uuid.UUID
	UserID         uuid.UUID
}

type ValidateRefreshTokenResponse

type ValidateRefreshTokenResponse struct {
	IsValid bool   `json:"is_valid"`
	Message string `json:"message,omitempty"`
}

type ValidateResponse

type ValidateResponse struct {
	IsValid bool `json:"is_valid"`
}

type VerifyServiceAccountTokenInput

type VerifyServiceAccountTokenInput struct {
	ServiceAccountTokenID uuid.UUID `json:"service_account_token_id"`
}

Jump to

Keyboard shortcuts

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