auth

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

An Authenticator is used to authenticate the rpc requests.

func NewAuthenticator

func NewAuthenticator(store *redis.Redis, key string, strict bool) (*Authenticator, error)

NewAuthenticator returns an Authenticator.

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate(ctx context.Context) error

Authenticate authenticates the given ctx.

type Credential

type Credential struct {
	App   string
	Token string
}

A Credential is used to authenticate.

func ParseCredential

func ParseCredential(ctx context.Context) Credential

ParseCredential parses credential from given ctx.

func (*Credential) GetRequestMetadata

func (c *Credential) GetRequestMetadata(context.Context, ...string) (map[string]string, error)

GetRequestMetadata gets the request metadata.

func (*Credential) RequireTransportSecurity

func (c *Credential) RequireTransportSecurity() bool

RequireTransportSecurity always returns false.

Jump to

Keyboard shortcuts

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