auth

package
v0.14.23 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: Apache-2.0, MIT Imports: 8 Imported by: 1

Documentation

Overview

Package auth implements custom predicates to match based on content of the HTTP Authorization header.

This predicate can be used to match a route based on data in the 2nd part of a JWT token, for example based on the issuer.

Examples:

    // one key value pair has to match
    example1: JWTPayloadAnyKV("iss", "https://accounts.google.com", "email", "skipper-router@googlegroups.com")
	-> "http://example.org/";
    // all key value pairs have to match
    example2: * && JWTPayloadAllKV("iss", "https://accounts.google.com", "email", "skipper-router@googlegroups.com")
	-> "http://example.org/";

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHeaderSHA256 added in v0.14.22

func NewHeaderSHA256() routing.PredicateSpec

NewHeaderSHA256 creates a predicate specification, whose instances match SHA-256 hash of the header value. The HeaderSHA256 predicate requires the header name and one or more hex-encoded SHA-256 hash values of the matching header.

func NewJWTPayloadAllKV

func NewJWTPayloadAllKV() routing.PredicateSpec

func NewJWTPayloadAllKVRegexp added in v0.10.271

func NewJWTPayloadAllKVRegexp() routing.PredicateSpec

func NewJWTPayloadAnyKV

func NewJWTPayloadAnyKV() routing.PredicateSpec

func NewJWTPayloadAnyKVRegexp added in v0.10.271

func NewJWTPayloadAnyKVRegexp() routing.PredicateSpec

Types

This section is empty.

Jump to

Keyboard shortcuts

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