externalapi

package
v0.0.0-...-affaa53 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenFormat   = "?token=%s"
	CertsEndpoint = "/certificates"
)
View Source
const (
	RenewCertURLFormat      = "%s/certificates/renewals"
	RevocationCertURLFormat = "%s/certificates/revocations"
)

Variables

This section is empty.

Functions

func NewHandlerBuilder

func NewHandlerBuilder(funcMiddlwares FunctionalMiddlewares, globalMiddlewares []mux.MiddlewareFunc) *handlerBuilder

func NewManagementInfoHandler

func NewManagementInfoHandler(connectorClientExtractor clientcontext.ConnectorClientExtractor, certProtectedBaseURL string) *managementInfoHandler

func NewRevocationHandler

func NewRevocationHandler(revocationList revocation.RevocationListRepository, headerParser certificates.HeaderParser) *revocationHandler

func NewStaticFileHandler

func NewStaticFileHandler(path string) http.Handler

NewStaticFileHandler creates handler for returning API spec

Types

type CSRInfoHandler

type CSRInfoHandler interface {
	GetCSRInfo(w http.ResponseWriter, r *http.Request)
}

func NewCSRInfoHandler

func NewCSRInfoHandler(tokenManager tokens.Creator, connectorClientExtractor clientcontext.ConnectorClientExtractor, getInfoURL string, baseURL string) CSRInfoHandler

type Config

type Config struct {
	TokenCreator                tokens.Creator
	ContextExtractor            clientcontext.ConnectorClientExtractor
	ManagementInfoURL           string
	ConnectorServiceBaseURL     string
	CertificateProtectedBaseURL string
	CertService                 certificates.Service
	RevokedCertsRepo            revocation.RevocationListRepository
	HeaderParser                certificates.HeaderParser
}

type FunctionalMiddlewares

type FunctionalMiddlewares struct {
	AppTokenResolverMiddleware      mux.MiddlewareFunc
	RuntimeTokenResolverMiddleware  mux.MiddlewareFunc
	RuntimeURLsMiddleware           mux.MiddlewareFunc
	AppContextFromSubjectMiddleware mux.MiddlewareFunc
	CheckForRevokedCertMiddleware   mux.MiddlewareFunc
}

type ManagementInfoHandler

type ManagementInfoHandler interface {
	GetManagementInfo(w http.ResponseWriter, r *http.Request)
}

type SignatureHandler

type SignatureHandler interface {
	SignCSR(w http.ResponseWriter, r *http.Request)
}

func NewSignatureHandler

func NewSignatureHandler(certificateService certificates.Service, connectorClientExtractor clientcontext.ConnectorClientExtractor) SignatureHandler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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