auth

package
Version: v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, MIT, MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package auth encrypt and compare password string.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(hashedPassword, password string) error

Compare compares the encrypted text with the plain text if it's the same.

func Encrypt

func Encrypt(source string) (string, error)

Encrypt encrypts the plain text with bcrypt.

func Sign

func Sign(secretID string, secretKey string, iss, aud string) string

Sign issue a jwt token based on secretID, secretKey, iss and aud.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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