clientfixture

package
v1.111.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package clientfixture converts OAuth client fixtures into the registration the registry accepts. It lives outside the clients package so tests under auth/federation and auth/oauth/server can share one conversion: the clients package's own helpers are unexported, and a package clients test file already imports internal/testutil, so the parent package cannot import clients back.

Index

Constants

View Source
const (
	PBKDF2Plaintext = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
	PBKDF2Digest    = "$pbkdf2-sha512$20000$$dsRQypqyPrhgUZpb9f65DIOwVu3D1Us5Me/KWRhGKeP3LwQ3j5spA2YzjstCa.VXtdaEmqgb.vF5WRJoXjk6.g"
)

PBKDF2Digest is Doorkeeper's Pbkdf2Sha512 transform of PBKDF2Plaintext, the one PBKDF2 shape gitlab-rails wrote (hashers.PBKDF2Pattern).

Variables

This section is empty.

Functions

func RegistrationFor

func RegistrationFor(c *clients.Client) clients.Registration

RegistrationFor hashes c.Secret, which stays plaintext for auth; the registration carries only the digest. Every field must be set; omitting one silently loses coverage.

func SHA512Hex

func SHA512Hex(plaintext []byte) string

SHA512Hex mirrors the Rails caller: Doorkeeper stores Digest::SHA512.hexdigest(plaintext).

Types

This section is empty.

Jump to

Keyboard shortcuts

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