Documentation ¶
Index ¶
- func HasPermission(method string, roles []string) bool
- func IsOidRole(oid string) bool
- func OidToString(oid []int) string
- func ParseRoles(roles string) []string
- func StartServer(conf conf.Config) error
- func StreamAuthInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func UnaryAuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasPermission ¶
HasPermission verifies the permission given a method and user roles
func OidToString ¶
OidToString convert the int[] to string with point separator between the values
func StartServer ¶
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.
Click to show internal directories.
Click to hide internal directories.