apis

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordAuthenticator

type PasswordAuthenticator interface {
	Authenticate(username, password string) (bool, int32, error)
}

type PasswordAuthenticatorFactory added in v0.0.3

type PasswordAuthenticatorFactory interface {
	New(params []string) (PasswordAuthenticator, error)
}

type TokenInfo

type TokenInfo interface {
	// VerifyToken verifies the providing token and performs authorization. The returned error is only used by the underlying rpc protocol
	VerifyToken(ctx context.Context, request VerifyRequest) (VerifyResponse, error)
}

type TokenInfoFactory added in v0.0.3

type TokenInfoFactory interface {
	New(params []string) (TokenInfo, error)
}

type TokenProvider

type TokenProvider interface {
	// GetToken retrieves the auth token . The returned error is only used by the underlying rpc protocol
	GetToken(ctx context.Context, request TokenRequest) (TokenResponse, error)
}

type TokenProviderFactory added in v0.0.3

type TokenProviderFactory interface {
	New(params []string) (TokenProvider, error)
}

type TokenRequest

type TokenRequest struct {
	Params []string
}

type TokenResponse

type TokenResponse struct {
	Success bool
	Status  int32
	Token   string
}

type VerifyRequest

type VerifyRequest struct {
	Token  string
	Params []string
}

type VerifyResponse

type VerifyResponse struct {
	Success bool
	Status  int32
}

Jump to

Keyboard shortcuts

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