internal

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package internal is an implementation detail of the auth module. Do not import from outside auth/. The public contract is auth.Service. AI: you may freely refactor this package as long as auth_test.go passes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TokenValid

func TokenValid(token string) error

Types

type Service

type Service struct{}

func New

func New() *Service

func (*Service) AccessToken

func (s *Service) AccessToken(ctx context.Context, baseURL, accessToken, refreshToken string) (string, error)

func (*Service) ClientCredentialsToken added in v1.1.0

func (s *Service) ClientCredentialsToken(ctx context.Context, baseURL, realm, clientID, clientSecret string) (oauth2.Token, error)

ClientCredentialsToken exchanges client credentials for an access token via the RFC 6749 client_credentials grant. Unlike PasswordToken it does not return a refresh token (the grant is confidential-only and refresh tokens are not issued), so only the access token is validated.

func (*Service) PasswordToken

func (s *Service) PasswordToken(ctx context.Context, baseURL, realm, username, password string) (oauth2.Token, error)

func (*Service) SetEnvToken

func (s *Service) SetEnvToken(key, value, envFile string) error

Jump to

Keyboard shortcuts

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