auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 4 modules, 3 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 auth configures the original Datly JWT verification contract for explicitly declared input codecs. It never injects an ambient principal.

Index

Constants

View Source
const JwtClaim = "JwtClaim"

Variables

This section is empty.

Functions

func VerifiesJWT

func VerifiesJWT(instance xcodec.Instance) bool

VerifiesJWT recognizes the configured codec actually constructed by Service. Names, marker interfaces, and unrelated codec implementations cannot assert this authority. No keys or verifier configuration are exposed.

Types

type Config

type Config struct {
	JWTValidator *verifier.Config
}

Config retains the original Datly JWTValidator configuration, including CertURL and RSA public-key resources. Verification policy stays with Scy.

type Service

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

Service is an application-configured codec factory. Pass it through the existing bootstrap CodecFactory input; only declared JwtClaim inputs use it.

func New

func New(ctx context.Context, config *Config) (*Service, error)

func (*Service) New

func (s *Service) New(config *xcodec.Config, _ ...xcodec.Option) (xcodec.Instance, error)

Jump to

Keyboard shortcuts

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