authapi

package
v0.0.0-...-908fd34 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrVerifyAPIUnavailable = errors.New("verify API is unavailable")

ErrVerifyAPIUnavailable - error representing unavailability of verify api

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents dependencies for auth client

func New

func New(log *zap.Logger, apiURL string) (*Client, error)

New constructs Client instance

func (*Client) VerifyToken

func (c *Client) VerifyToken(ctx context.Context, token string) (VerifyTokenResp, error)

VerifyToken returns result of token verification

type VerifyToken

type VerifyToken struct {
	Token string `json:"token" validate:"jwt"`
}

VerifyToken is a request type for JWT verification

type VerifyTokenResp

type VerifyTokenResp struct {
	Valid bool `json:"valid"`
}

VerifyTokenResp is a response type for JWT verification

Jump to

Keyboard shortcuts

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