api

package
v0.0.0-...-e05e9dc Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPermission

func HasPermission(method string, roles []string) bool

HasPermission verifies the permission given a method and user roles

func IsOidRole

func IsOidRole(oid string) bool

IsOidRole validates the role oid

func OidToString

func OidToString(oid []int) string

OidToString convert the int[] to string with point separator between the values

func ParseRoles

func ParseRoles(roles string) []string

ParseRoles split the roles string by comma

func StartServer

func StartServer(conf conf.Config) error

func StreamAuthInterceptor

func StreamAuthInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

StreamAuthInterceptor intercept stream calls to authorize the user based on certification extension oid 1.2.840.10070.8.1.

func UnaryAuthInterceptor

func UnaryAuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

UnaryAuthInterceptor intercept unary calls to authorize the user based on certification extension oid 1.2.840.10070.8.1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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