authapi

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxWithTimeout

func CtxWithTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

CtxWithTimeout returns context and cancel fn with provided timeout if no deadline set in context, otherwise returns original context and cancel fc

Types

type Client

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

Client wraps a gRPC AuthApiService client

func NewClient

func NewClient(conf Config) (*Client, error)

NewClient dials the authapi service and returns a ready client

func (*Client) Close

func (c *Client) Close() error

Close closes the underlying gRPC connection

func (*Client) VerifyToken

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

VerifyToken returns result of token verification

type Config

type Config struct {
	Address     string
	Timeout     time.Duration
	DialOptions []grpc.DialOption
}

Config - settings for authapi service

Jump to

Keyboard shortcuts

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