Documentation ¶
Index ¶
- Constants
- func NewAccessMiddleware(accessLogger AccessLogger, host, port string, log *logger.Logger) func(http.Handler) *AccessHandler
- func NewNullAccessMiddleware() func(http.Handler) *AccessHandler
- type AccessHandler
- type AccessLog
- type AccessLogger
- type AlgorithmError
- type CAPIClient
- type CAPIOption
- type CFAuthMiddlewareProvider
- type DefaultAccessLogger
- type HTTPClient
- type LogAuthorizer
- type NullAccessLogger
- type Oauth2ClientContext
- type Oauth2ClientReader
- type QueryParser
- type UAAClient
- type UAAOption
- type UnknownTokenKeyError
Constants ¶
View Source
const (
MAX_RETRIES = 3
)
Variables ¶
This section is empty.
Functions ¶
func NewAccessMiddleware ¶
func NewAccessMiddleware(accessLogger AccessLogger, host, port string, log *logger.Logger) func(http.Handler) *AccessHandler
func NewNullAccessMiddleware ¶
func NewNullAccessMiddleware() func(http.Handler) *AccessHandler
Types ¶
type AccessHandler ¶
type AccessHandler struct {
// contains filtered or unexported fields
}
func NewAccessHandler ¶
func NewAccessHandler(handler http.Handler, accessLogger AccessLogger, host, port string, log *logger.Logger) *AccessHandler
func (*AccessHandler) ServeHTTP ¶
func (h *AccessHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type AccessLog ¶
type AccessLog struct {
// contains filtered or unexported fields
}
func NewAccessLog ¶
type AccessLogger ¶
type AlgorithmError ¶
type AlgorithmError struct {
Alg string
}
func (AlgorithmError) Error ¶
func (e AlgorithmError) Error() string
type CAPIClient ¶
type CAPIClient struct {
// contains filtered or unexported fields
}
func NewCAPIClient ¶
func NewCAPIClient( externalCapiAddr string, client HTTPClient, metrics metrics.Registrar, log *logger.Logger, opts ...CAPIOption, ) *CAPIClient
func (*CAPIClient) AvailableSourceIDs ¶ added in v1.2.1
func (c *CAPIClient) AvailableSourceIDs(authToken string) []string
func (*CAPIClient) GetRelatedSourceIds ¶
func (c *CAPIClient) GetRelatedSourceIds(appNames []string, authToken string) map[string][]string
func (*CAPIClient) IsAuthorized ¶
func (c *CAPIClient) IsAuthorized(sourceId string, clientToken string) bool
func (*CAPIClient) TokenCacheSize ¶
func (c *CAPIClient) TokenCacheSize() int
type CAPIOption ¶
type CAPIOption func(c *CAPIClient)
func WithCacheExpirationInterval ¶
func WithCacheExpirationInterval(interval time.Duration) CAPIOption
func WithTokenPruningInterval ¶
func WithTokenPruningInterval(interval time.Duration) CAPIOption
type CFAuthMiddlewareProvider ¶
type CFAuthMiddlewareProvider struct {
// contains filtered or unexported fields
}
func NewCFAuthMiddlewareProvider ¶
func NewCFAuthMiddlewareProvider( oauth2Reader Oauth2ClientReader, logAuthorizer LogAuthorizer, queryParser QueryParser, metrics metrics.Registrar, log *logger.Logger, ) CFAuthMiddlewareProvider
func (CFAuthMiddlewareProvider) Middleware ¶
func (m CFAuthMiddlewareProvider) Middleware(h http.Handler) http.Handler
type DefaultAccessLogger ¶
type DefaultAccessLogger struct {
// contains filtered or unexported fields
}
func NewAccessLogger ¶
func NewAccessLogger(writer io.Writer, log *logger.Logger) *DefaultAccessLogger
type LogAuthorizer ¶
type NullAccessLogger ¶
type NullAccessLogger struct { }
func NewNullAccessLogger ¶
func NewNullAccessLogger() *NullAccessLogger
type Oauth2ClientContext ¶
type Oauth2ClientReader ¶
type Oauth2ClientReader interface {
Read(token string) (Oauth2ClientContext, error)
}
type QueryParser ¶
type UAAClient ¶
type UAAClient struct {
// contains filtered or unexported fields
}
func NewUAAClient ¶
func (*UAAClient) GetAuthHeader ¶ added in v1.4.3
func (*UAAClient) RefreshTokenKeys ¶
type UAAOption ¶
type UAAOption func(uaa *UAAClient)
func WithClientCredentials ¶ added in v1.4.3
type UnknownTokenKeyError ¶
type UnknownTokenKeyError struct {
Kid string
}
func (UnknownTokenKeyError) Error ¶
func (e UnknownTokenKeyError) Error() string
Click to show internal directories.
Click to hide internal directories.