duo

package
v4.30.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Call(values url.Values, ctx *middlewares.AutheliaCtx) (*Response, error)
}

API interface wrapping duo api library for testing purpose.

type APIImpl

type APIImpl struct {
	*duoapi.DuoApi
}

APIImpl implementation of DuoAPI interface.

func NewDuoAPI

func NewDuoAPI(duoAPI *duoapi.DuoApi) *APIImpl

NewDuoAPI create duo API instance.

func (*APIImpl) Call

func (d *APIImpl) Call(values url.Values, ctx *middlewares.AutheliaCtx) (*Response, error)

Call call to the DuoAPI.

type Response

type Response struct {
	Response struct {
		Result        string `json:"result"`
		Status        string `json:"status"`
		StatusMessage string `json:"status_msg"`
	} `json:"response"`
	Code          int    `json:"code"`
	Message       string `json:"message"`
	MessageDetail string `json:"message_detail"`
	Stat          string `json:"stat"`
}

Response response coming from Duo API.

Jump to

Keyboard shortcuts

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