auth

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

README

auth

import "github.com/coralproject/shelf/internal/platform/midware/auth"

Overview

Index

Package files

midware.go

Variables

var ErrInvalidToken = errors.New("invalid token")

ErrInvalidToken is returned when the token provided is not valid.

func Midware

func Midware(publicKeyBase64Str string, config MidwareOpts) (web.Middleware, error)

Midware handles token authentication for external authentication sources.

type MidwareOpts

type MidwareOpts struct {

    // AllowQueryString is true when we want to allow accessing the tokenString
    // from the query string as a fallback.
    AllowQueryString bool
}

MidwareOpts describes the options for configuring the Midware.


Generated by godoc2md

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidToken = errors.New("invalid token")

ErrInvalidToken is returned when the token provided is not valid.

Functions

func Midware

func Midware(publicKeyBase64Str string, config MidwareOpts) (web.Middleware, error)

Midware handles token authentication for external authentication sources.

Types

type MidwareOpts

type MidwareOpts struct {

	// AllowQueryString is true when we want to allow accessing the tokenString
	// from the query string as a fallback.
	AllowQueryString bool
}

MidwareOpts describes the options for configuring the Midware.

Jump to

Keyboard shortcuts

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