credentials

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, db *gorm.DB, appID, name, digest string) (*schema.Credential, error)

Create stores a client secret, as its digest, for appID.

func GenerateSecret

func GenerateSecret() (secret, digest string, err error)

GenerateClientSecret returns a new client secret and the digest to persist.

The plaintext is returned to the caller exactly once, at registration time, and must never be stored. Only the digest goes in the database.

Types

type Secret

type Secret struct {
	Digest string
}

func GetSecretFromCredential

func GetSecretFromCredential(c *schema.Credential) (*Secret, error)

func (*Secret) VerifyAgainst

func (s *Secret) VerifyAgainst(presented string) bool

Jump to

Keyboard shortcuts

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