internalidp

package
v1.74.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJWTClientInterceptor

func NewJWTClientInterceptor(logger logging.Logger, client LoginClient) apigen.RequestEditorFn

func WithLoginTokenAuth

func WithLoginTokenAuth(logger logging.Logger, client LoginClient) apigen.ClientOption

WithLoginTokenAuth adds an authentication provider into the GetClient request, which authenticates using the JWT token. It can update its token.

BUG(ariels): It does not (yet) update its token.

Types

type FixedLoginClient

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

FixedLoginClient just returns the same token each time, which it does not refresh.

func NewFixedLoginClient

func NewFixedLoginClient(token string) *FixedLoginClient

func (*FixedLoginClient) GetToken

func (c *FixedLoginClient) GetToken(_ context.Context) (string, error)

type JWTAuthClient

type JWTAuthClient struct {
	Client *apigen.ClientWithResponses
}

type LoginClient

type LoginClient interface {
	// GetToken returns a valid token, refreshing it if needed.
	GetToken(ctx context.Context) (string, error)
}

LoginClient has all the methods used during a token-based login.

Notes

Bugs

  • It does not (yet) update its token.

Jump to

Keyboard shortcuts

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