internal

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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