macaroon-bakery.v2-unstable: Index | Files

package form

import ""

Package form enables interactive login without using a web browser.


Package Files



const (
    // InteractionMethod is the methodURLs key
    // used for a URL that can be used for form-based
    // interaction.
    InteractionMethod = "form"

type InteractionInfo Uses

type InteractionInfo struct {
    URL string `json:"url"`

InteractionInfo holds the information expected in the form interaction entry in an interaction-required error.

type Interactor Uses

type Interactor struct {
    // Filler holds the form filler that will be used when
    // form-based interaction is required.
    Filler form.Filler

Interactor implements httpbakery.Interactor by providing form-based interaction.

func (Interactor) Interact Uses

func (i Interactor) Interact(ctx context.Context, client *httpbakery.Client, location string, interactionRequiredErr *httpbakery.Error) (*httpbakery.DischargeToken, error)

Interact implements httpbakery.Interactor.Interact.

func (Interactor) Kind Uses

func (i Interactor) Kind() string

Kind implements httpbakery.Interactor.Kind.

type LoginBody Uses

type LoginBody struct {
    Form map[string]interface{} `json:"form"`

LoginBody holds the body of a form login request.

type LoginRequest Uses

type LoginRequest struct {
    httprequest.Route `httprequest:"POST"`
    Body              LoginBody `httprequest:",body"`

LoginRequest is a request to perform a login using the provided form.

type LoginResponse Uses

type LoginResponse struct {
    Token *httpbakery.DischargeToken `json:"token"`

type SchemaResponse Uses

type SchemaResponse struct {
    Schema environschema.Fields `json:"schema"`

SchemaResponse contains the message expected in response to the schema request.

Package form imports 9 packages (graph). Updated 2018-03-02. Refresh now. Tools for package owners.