package
0.0.0-20230101183712-202847b4b89b
Repository: https://github.com/corestoreio/csfw.git
Documentation: pkg.go.dev

# Functions

AddBasicAuthToOutgoingContext adds a basic authentication header to a new outgoing context: "authorization: Basic base64EncodedUserPass".
AuthFromMD is a helper function for extracting the :authorization header from the gRPC metadata of the request.
NewService creates a new ServiceAuthFuncOverrider containing various chained authentication methods.
StreamServerInterceptor returns a new unary server interceptors that performs per-request auth.
UnaryServerInterceptor returns a new unary server interceptors that performs per-request auth.
WithBasicAuth uses basic authentication.
WithJWTAuth parses and verifies a token.
WithLogger adds a logger otherwise logging would be completely disabled.
WithTLSAuth checks the TLS certificate.
WithTokenAuth checks a simple token carried in the bearer or another optional scheme name.

# Constants

HeaderAuthorize defines the HTTP header name where to find the token.

# Structs

BasicOptions sets options to WithBasicAuth.
JWTOptions sets options to WithJWTAuth.
Option applies various settings to NewService.
TokenOptions to be used in WithTokenAuth.

# Interfaces

ServiceAuthFuncOverrider allows a given gRPC service implementation to override the global `AuthFunc`.

# Type aliases

AuthFunc is the pluggable function that performs authentication.
ServiceAuthFunc implements ServiceAuthFuncOverrider, mainly used for testing.