router

package
v0.0.0-...-6e39296 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package router routes HTTP requests to corresponding handler. The authenticate request is defined as path "/authn" and only accept HTTP POST request. The authorization request is defined as path "/authz" and only accept HTTP POST request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns ServeMux with routes using given handler.

Types

type Route

type Route struct {
	Name        string
	Methods     []string
	Pattern     string
	HandlerFunc handler.Func
}

Route represents the routing information from incoming request.

func NewRoutes

func NewRoutes(h handler.Handler) []Route

NewRoutes returns routes defined for handling authenticate and authorize requests. The authenticate requests will accept for only HTTP POST requests, and the endpoint is /authn. The authorize requests will accept for only HTTP POST requests, and the endpoint is /authz.

Jump to

Keyboard shortcuts

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