rkgrpcauth

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package rkgrcpauth is auth interceptor for grpc framework

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamClientInterceptor

func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor

StreamClientInterceptor create new stream client interceptor.

func StreamServerInterceptor

func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor

StreamServerInterceptor create new stream server interceptor.

func UnaryClientInterceptor

func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor

UnaryClientInterceptor create new unary client interceptor.

func UnaryServerInterceptor

func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor

UnaryServerInterceptor create new unary server interceptor.

Types

type Option

type Option func(*optionSet)

func WithApiKeyAuth

func WithApiKeyAuth(key ...string) Option

WithApiKeyAuth provide API Key auth credentials. An API key is a token that a client provides when making API calls. With API key auth, you send a key-value pair to the API either in the request headers or query parameters. Some APIs use API keys for authorization.

The API key was injected into incoming header with key of X-API-Key

func WithBasicAuth

func WithBasicAuth(cred ...string) Option

WithBasicAuth provide basic auth credentials formed as user:pass. We will encode credential with base64 since incoming credential from client would be encoded.

func WithEntryNameAndType

func WithEntryNameAndType(entryName, entryType string) Option

WithEntryNameAndType provide entry name and entry type.

func WithIgnorePrefix

func WithIgnorePrefix(paths ...string) Option

WithIgnorePrefix provide methods that will ignore. Mainly used for swagger main page and RK TV entry.

Jump to

Keyboard shortcuts

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