auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessTokenEnvVar  = "KEYCLOAK_ACCESS_TOKEN"
	RefreshTokenEnvVar = "KEYCLOAK_REFRESH_TOKEN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	PasswordToken(ctx context.Context, baseURL, realm, username, password string) (oauth2.Token, error)
	AccessToken(ctx context.Context, baseURL, accessToken, refreshToken string) (string, error)
	SetEnvToken(key, value, envFile string) error
}

Service is the public API for Keycloak admin token acquisition and refresh.

func New

func New() Service

New returns a production-ready auth service.

Directories

Path Synopsis
Package internal is an implementation detail of the auth module.
Package internal is an implementation detail of the auth module.

Jump to

Keyboard shortcuts

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