handlers

package
v0.0.0-...-445c7d5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPBasic

type HTTPBasic struct {
}

HTTPBasic struct

func NewHTTPBasic

func NewHTTPBasic(opts Options) (*HTTPBasic, error)

NewHTTPBasic return a http basic auth handler

func (*HTTPBasic) StreamAuth

func (htb *HTTPBasic) StreamAuth(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (bool, error)

StreamAuth stream auth function

func (*HTTPBasic) UnaryAuth

func (htb *HTTPBasic) UnaryAuth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (bool, interface{}, error)

UnaryAuth unary auth function

type HTTPBasicOptions

type HTTPBasicOptions struct {
	Username  string
	Passwords []string
	Options
}

HTTPBasicOptions options for HTTPBasic.

type Handler

type Handler interface {
	// StreamAuth stream grpc authorize function
	StreamAuth(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (bool, error)
	// UnaryAuth unary grpc authorize function
	UnaryAuth(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (bool, interface{}, error)
}

Handler auth handler interface

type Options

type Options interface {
}

Options for auth handler.

Jump to

Keyboard shortcuts

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