webauth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0, BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CfgWebAPIAuthUsername defines the config flag of the web API authentication username.
	CfgWebAPIAuthUsername = "webapi.auth.username"
	// CfgWebAPIAuthPassword defines the config flag of the web API authentication password.
	CfgWebAPIAuthPassword = "webapi.auth.password"
	// CfgWebAPIAuthPrivateKey defines the config flag of the web API authentication private key.
	CfgWebAPIAuthPrivateKey = "webapi.auth.privateKey"
)
View Source
const PluginName = "WebAPI Auth"

PluginName is the name of the web API auth plugin.

Variables

This section is empty.

Functions

func Handler

func Handler(c echo.Context) error

Handler handles the web auth request.

func Plugin added in v0.2.0

func Plugin() *node.Plugin

Plugin gets the plugin instance.

Types

type Request

type Request struct {
	// Username is the username of the request.
	Username string `json:"username"`
	// Password is the password of the request.
	Password string `json:"password"`
}

Request defines the struct of the request.

type Response

type Response struct {
	// Token is the json web token.
	Token string `json:"token"`
}

Response defines the struct of the response.

Jump to

Keyboard shortcuts

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