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: 3

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