Documentation ¶
Overview ¶
Package authprocessor checks if there's an authorization header, and then processes it into a path prefix and injects it into the context. It will construct an auth header like "foo;bar;baz" to "foo/bar/baz", which is used as a prefix to check for the files, relative to the serve root of the service. We are aware this is not an actual auth method. To repeat DO NOT USE THIS AS-IS IN PRODUCTION, THIS IS JUST TO DEMONSTRATE THAT THE AUTH HEADER IS BEING FORWARDED BY RUN-DSP. THIS OFFERS NO SECURITY.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPrefix ¶
ExtractPrefix will extract the prefix from the context.
func StreamInterceptor ¶
func StreamInterceptor( srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler, ) error
StreamInterceptor will process the authorization header, convert it to a prefix, and then inject it into the context, but for streams.
func UnaryInterceptor ¶
func UnaryInterceptor( ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (any, error)
UnaryInterceptor will process the authorization header, convert it to a prefix, and then inject it into the context.
Types ¶
This section is empty.