Documentation ¶
Index ¶
- func Implementor() service.Authenticator
- func NewAlgorithmAuth(client, server TokenParser) service.Authenticator
- func RegisterImplementor(auth service.Authenticator)
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func UnaryServerInterceptor() grpc.UnaryServerInterceptor
- type AlgorithmAuth
- func (n *AlgorithmAuth) Authenticate(ctx context.Context, serviceMethod string) (*secret.Info, error)
- func (n *AlgorithmAuth) IsAnonymousMethod(serviceMethod string) bool
- func (n *AlgorithmAuth) IsValidPlatform(sub permission.Subject, platform common.Platform) bool
- func (n *AlgorithmAuth) RegisterServiceSubjects(component string, serviceMethodSubjects map[string][]permission.Subject)
- func (n *AlgorithmAuth) ServiceComponentName(serviceMethod string) string
- type TokenParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAlgorithmAuth ¶
func NewAlgorithmAuth(client, server TokenParser) service.Authenticator
func RegisterImplementor ¶
func RegisterImplementor(auth service.Authenticator)
Register service implementor.
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
Types ¶
type AlgorithmAuth ¶
type AlgorithmAuth struct {
// contains filtered or unexported fields
}
func (*AlgorithmAuth) Authenticate ¶
func (n *AlgorithmAuth) Authenticate(ctx context.Context, serviceMethod string) (*secret.Info, error)
Authenticate a request specified by the full url path of the method.
func (*AlgorithmAuth) IsAnonymousMethod ¶
func (n *AlgorithmAuth) IsAnonymousMethod(serviceMethod string) bool
func (*AlgorithmAuth) IsValidPlatform ¶
func (n *AlgorithmAuth) IsValidPlatform(sub permission.Subject, platform common.Platform) bool
func (*AlgorithmAuth) RegisterServiceSubjects ¶
func (n *AlgorithmAuth) RegisterServiceSubjects(component string, serviceMethodSubjects map[string][]permission.Subject)
RegisterServiceSubjects registers required method subjects of the service. The map key of the parameter is the full url path of the method.
func (*AlgorithmAuth) ServiceComponentName ¶
func (n *AlgorithmAuth) ServiceComponentName(serviceMethod string) string
ServiceComponentName returns the component name implements the service method.
Click to show internal directories.
Click to hide internal directories.