Documentation
¶
Index ¶
- Constants
- Variables
- func NewMetricsMiddleware(statusMetricsHandler core.StatusMetricsHandler, conf config.ApiRoutesConfig) (*metricsMiddleware, error)
- func NewNativeAuth(args ArgNativeAuth) (*nativeAuth, error)
- func NewNativeAuthWhitelistHandler(apiPackages map[string]config.APIPackageConfig) *nativeAuthWhitelistHandler
- func NewUserContext() *userContext
- type ArgNativeAuth
Constants ¶
View Source
const ( // UserAgentKey is the key of pair for the user agent stored in the context map UserAgentKey = "userAgent" // UserIpKey is the key of pair for the user ip stored in the context map UserIpKey = "userIp" )
View Source
const UserAddressKey = "userAddress"
UserAddressKey is the key of pair for the user address stored in the context map
Variables ¶
View Source
var ErrMalformedToken = errors.New("malformed token")
ErrMalformedToken signals that a malformed token has been provided
Functions ¶
func NewMetricsMiddleware ¶
func NewMetricsMiddleware( statusMetricsHandler core.StatusMetricsHandler, conf config.ApiRoutesConfig, ) (*metricsMiddleware, error)
NewMetricsMiddleware returns a new instance of metricsMiddleware
func NewNativeAuth ¶
func NewNativeAuth(args ArgNativeAuth) (*nativeAuth, error)
NewNativeAuth returns a new instance of nativeAuth
func NewNativeAuthWhitelistHandler ¶
func NewNativeAuthWhitelistHandler(apiPackages map[string]config.APIPackageConfig) *nativeAuthWhitelistHandler
NewNativeAuthWhitelistHandler returns a new instance of nativeAuthWhitelistHandler
func NewUserContext ¶
func NewUserContext() *userContext
NewUserContext returns a new instance of userContext
Types ¶
type ArgNativeAuth ¶
type ArgNativeAuth struct {
Validator authentication.AuthServer
TokenHandler authentication.AuthTokenHandler
WhitelistHandler core.NativeAuthWhitelistHandler
}
Click to show internal directories.
Click to hide internal directories.