grpcbasicauth

package module
v0.0.0-...-f4995c3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2018 License: MIT Imports: 8 Imported by: 0

README

grpc-basicauth

Build Status codecov GoDoc Go project version Go Report Card license

grpc-basicauth implements interceptors support basic authentication, like HTTP's one.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamClientInterceptor

func StreamClientInterceptor(username, password string, opts ...BasicAuthOption) grpc.StreamClientInterceptor

StreamClientInterceptor returns a stream interceptor to attach basic username and password to metadata.

func StreamServerInterceptor

func StreamServerInterceptor(username, password string, opts ...BasicAuthOption) grpc.StreamServerInterceptor

StreamServerInterceptor returns a stream interceptor to enable basic authentication.

func UnaryClientInterceptor

func UnaryClientInterceptor(username, password string, opts ...BasicAuthOption) grpc.UnaryClientInterceptor

UnaryClientInterceptor returns an unary interceptor to attach basic username and password to metadata.

func UnaryServerInterceptor

func UnaryServerInterceptor(username, password string, opts ...BasicAuthOption) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns an unary interceptor to enable basic authentication.

Types

type BasicAuthOption

type BasicAuthOption func(*BasicAuthOptions)

BasicAuthOption configures basic authentication on gRPC server.

func WithSkippedMethods

func WithSkippedMethods(fullMethodNames ...string) BasicAuthOption

WithSkippedMethods returns a BasicAuthOption which appends method name to be skipped basic authentication.

type BasicAuthOptions

type BasicAuthOptions struct {
	// contains filtered or unexported fields
}

BasicAuthOptions contains configurations of basic authentication on gRPC server.

Jump to

Keyboard shortcuts

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