plain

package
v0.0.0-...-15ac6bc Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Implementation of SASL PLAIN (RFC 4616)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Username string
	Pass     []byte
}

func NewCredential

func NewCredential(username string, pass string) *Credential

A plain credential stores the bcrypted sha256 hash of pass https://security.stackexchange.com/questions/39849/does-bcrypt-have-a-maximum-password-length/184090#184090

func (*Credential) Check

func (c *Credential) Check(username string, pass []byte) bool

type Plain

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

func New

func New(db *sql.DB) *Plain

func (*Plain) Authn

func (p *Plain) Authn() string

func (*Plain) Next

func (p *Plain) Next(b []byte) (challenge []byte, err error)

Jump to

Keyboard shortcuts

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