auth

package
v0.0.0-...-4f8386e Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package auth contains methods for working with authorization tokens, their generation and parsing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

Auth is implements app.Auth. Responsible for working with authorization tokens, be it cookies or jwt.

func New

func New(secretKey string) *Auth

New creates and returns new instance auth.

func (*Auth) Subject

func (a *Auth) Subject(token string) (uuid.UUID, error)

Subject need for implements app.Auth.

func (*Auth) Token

func (a *Auth) Token(subject uuid.UUID) (*app.Token, error)

Token need for implements app.Auth.

Jump to

Keyboard shortcuts

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