authclient

package
v0.0.0-...-38a15d6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCustomClient

func WithCustomClient(httpClient *http.Client) func(*ServiceClient)

This function would rather use a custom http(s) client over the default client configured at the package level

Types

type AuthenticateResp

type AuthenticateResp struct {
	UserID uuid.UUID
	Claims auth.Claims
}

type Error

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

func (Error) Error

func (err Error) Error() string

type Logger

type Logger func(ctx context.Context, msg string, v ...any)

type ServiceClient

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

func New

func New(url string, log Logger, options ...func(*ServiceClient)) *ServiceClient

func (*ServiceClient) Authenticate

func (cln *ServiceClient) Authenticate(ctx context.Context, authorization string) (AuthenticateResp, error)

Jump to

Keyboard shortcuts

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