package
0.4.8
Repository: https://github.com/coralproject/shelf.git
Documentation: pkg.go.dev

# 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

# Functions

Midware handles token authentication for external authentication sources.

# Variables

ErrInvalidToken is returned when the token provided is not valid.

# Structs

MidwareOpts describes the options for configuring the Midware.