authenticator

package
v0.0.0-...-f356f3c Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package authenticator provides functions to authenticate incoming requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash compares the input password with the stored password, and finally validates if they are match or not

func CreateAccessToken

func CreateAccessToken(tokenAuth *jwtauth.JWTAuth, jwtClaims JWTClaims) string

CreateAccessToken creates an access token

func MakeTokenAuth

func MakeTokenAuth(jwtAlgo jwa.SignatureAlgorithm, jwtSecret string) (*jwtauth.JWTAuth, error)

MakeTokenAuth creates token authentication

Types

type JWTClaims

type JWTClaims map[string]interface{}

JWTClaims is the data type of claims in Encode() function (jwtauth.go)

Jump to

Keyboard shortcuts

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