auth

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Funzioni per la verifica di token JWT di autorizzazione.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeSigning

func InitializeSigning() error

Inizializza l'algoritmo per la firma HS256

Types

type InvalidTokenError

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

Errore nella verifica del token

func (*InvalidTokenError) Error

func (e *InvalidTokenError) Error() string

type UserInfo

type UserInfo struct {
	Username string `json:"username"`
}

Valore di ritorno di ParseToken

func ParseToken

func ParseToken(token []byte) (UserInfo, error)

Verifica un token e ne restituisce le informazioni

Jump to

Keyboard shortcuts

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