package auth

import "github.com/nats-io/gnatsd/auth"

Index

Types

type MultiUser

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

Plain authentication is a basic username and password

func NewMultiUser

func NewMultiUser(users []*server.User) *MultiUser

Create a new multi-user

func (*MultiUser) Check

func (m *MultiUser) Check(c server.ClientAuth) bool

Check authenticates the client using a username and password against a list of multiple users.

type Plain

type Plain struct {
	Username string
	Password string
}

Plain authentication is a basic username and password

func (*Plain) Check

func (p *Plain) Check(c server.ClientAuth) bool

Check authenticates the client using a username and password

type Token

type Token struct {
	Token string
}

Token holds a string token used for authentication

func (*Token) Check

func (p *Token) Check(c server.ClientAuth) bool

Check authenticates a client from a token

Source Files

multiuser.go plain.go token.go

Version
v0.9.6
Published
Dec 15, 2016
Platform
js/wasm
Imports
3 packages
Last checked
1 hour ago

Tools for package owners.