authorize

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_authorize_proto protoreflect.FileDescriptor

Functions

func RegisterAuthorizerServer

func RegisterAuthorizerServer(s *grpc.Server, srv AuthorizerServer)

Types

type AuthorizerClient

type AuthorizerClient interface {
	IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedReply, error)
}

AuthorizerClient is the client API for Authorizer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAuthorizerClient

func NewAuthorizerClient(cc grpc.ClientConnInterface) AuthorizerClient

type AuthorizerServer

type AuthorizerServer interface {
	IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedReply, error)
}

AuthorizerServer is the server API for Authorizer service.

type HTTPStatus added in v0.9.0

type HTTPStatus struct {
	Code    int32             `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string            `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Headers map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*HTTPStatus) Descriptor deprecated added in v0.9.0

func (*HTTPStatus) Descriptor() ([]byte, []int)

Deprecated: Use HTTPStatus.ProtoReflect.Descriptor instead.

func (*HTTPStatus) GetCode added in v0.9.0

func (x *HTTPStatus) GetCode() int32

func (*HTTPStatus) GetHeaders added in v0.9.0

func (x *HTTPStatus) GetHeaders() map[string]string

func (*HTTPStatus) GetMessage added in v0.9.0

func (x *HTTPStatus) GetMessage() string

func (*HTTPStatus) ProtoMessage added in v0.9.0

func (*HTTPStatus) ProtoMessage()

func (*HTTPStatus) ProtoReflect added in v0.9.0

func (x *HTTPStatus) ProtoReflect() protoreflect.Message

func (*HTTPStatus) Reset added in v0.9.0

func (x *HTTPStatus) Reset()

func (*HTTPStatus) String added in v0.9.0

func (x *HTTPStatus) String() string

type IsAuthorizedReply added in v0.7.0

type IsAuthorizedReply struct {
	Allow          bool        `protobuf:"varint,1,opt,name=allow,proto3" json:"allow,omitempty"`
	SessionExpired bool        `protobuf:"varint,2,opt,name=session_expired,json=sessionExpired,proto3" json:"session_expired,omitempty"` // special case
	DenyReasons    []string    `protobuf:"bytes,3,rep,name=deny_reasons,json=denyReasons,proto3" json:"deny_reasons,omitempty"`
	SignedJwt      string      `protobuf:"bytes,4,opt,name=signed_jwt,json=signedJwt,proto3" json:"signed_jwt,omitempty"`
	User           string      `protobuf:"bytes,5,opt,name=user,proto3" json:"user,omitempty"`
	Email          string      `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
	Groups         []string    `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups,omitempty"`
	HttpStatus     *HTTPStatus `protobuf:"bytes,8,opt,name=http_status,json=httpStatus,proto3" json:"http_status,omitempty"`
	// contains filtered or unexported fields
}

func (*IsAuthorizedReply) Descriptor deprecated added in v0.7.0

func (*IsAuthorizedReply) Descriptor() ([]byte, []int)

Deprecated: Use IsAuthorizedReply.ProtoReflect.Descriptor instead.

func (*IsAuthorizedReply) GetAllow added in v0.7.0

func (x *IsAuthorizedReply) GetAllow() bool

func (*IsAuthorizedReply) GetDenyReasons added in v0.7.0

func (x *IsAuthorizedReply) GetDenyReasons() []string

func (*IsAuthorizedReply) GetEmail added in v0.7.0

func (x *IsAuthorizedReply) GetEmail() string

func (*IsAuthorizedReply) GetGroups added in v0.7.0

func (x *IsAuthorizedReply) GetGroups() []string

func (*IsAuthorizedReply) GetHttpStatus added in v0.9.0

func (x *IsAuthorizedReply) GetHttpStatus() *HTTPStatus

func (*IsAuthorizedReply) GetSessionExpired added in v0.7.0

func (x *IsAuthorizedReply) GetSessionExpired() bool

func (*IsAuthorizedReply) GetSignedJwt added in v0.7.0

func (x *IsAuthorizedReply) GetSignedJwt() string

func (*IsAuthorizedReply) GetUser added in v0.7.0

func (x *IsAuthorizedReply) GetUser() string

func (*IsAuthorizedReply) ProtoMessage added in v0.7.0

func (*IsAuthorizedReply) ProtoMessage()

func (*IsAuthorizedReply) ProtoReflect added in v0.9.0

func (x *IsAuthorizedReply) ProtoReflect() protoreflect.Message

func (*IsAuthorizedReply) Reset added in v0.7.0

func (x *IsAuthorizedReply) Reset()

func (*IsAuthorizedReply) String added in v0.7.0

func (x *IsAuthorizedReply) String() string

type IsAuthorizedRequest added in v0.7.0

type IsAuthorizedRequest struct {

	// User Context
	//
	UserToken string `protobuf:"bytes,1,opt,name=user_token,json=userToken,proto3" json:"user_token,omitempty"`
	// Request Context
	//
	// Method specifies the HTTP method (GET, POST, PUT, etc.).
	RequestMethod string `protobuf:"bytes,2,opt,name=request_method,json=requestMethod,proto3" json:"request_method,omitempty"`
	// URL specifies either the URI being requested
	RequestUrl string `protobuf:"bytes,3,opt,name=request_url,json=requestUrl,proto3" json:"request_url,omitempty"`
	// host specifies the host on which the URL per RFC 7230, section 5.4
	RequestHost string `protobuf:"bytes,4,opt,name=request_host,json=requestHost,proto3" json:"request_host,omitempty"`
	// request_uri is the unmodified request-target of the
	// Request-Line (RFC 7230, Section 3.1.1) as sent by the client
	RequestRequestUri string `protobuf:"bytes,5,opt,name=request_request_uri,json=requestRequestUri,proto3" json:"request_request_uri,omitempty"`
	// RemoteAddr allows HTTP servers and other software to record
	// the network address that sent the request, usually for
	RequestRemoteAddr string                                  `protobuf:"bytes,6,opt,name=request_remote_addr,json=requestRemoteAddr,proto3" json:"request_remote_addr,omitempty"`
	RequestHeaders    map[string]*IsAuthorizedRequest_Headers `` /* 191-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*IsAuthorizedRequest) Descriptor deprecated added in v0.7.0

func (*IsAuthorizedRequest) Descriptor() ([]byte, []int)

Deprecated: Use IsAuthorizedRequest.ProtoReflect.Descriptor instead.

func (*IsAuthorizedRequest) GetRequestHeaders added in v0.7.0

func (x *IsAuthorizedRequest) GetRequestHeaders() map[string]*IsAuthorizedRequest_Headers

func (*IsAuthorizedRequest) GetRequestHost added in v0.7.0

func (x *IsAuthorizedRequest) GetRequestHost() string

func (*IsAuthorizedRequest) GetRequestMethod added in v0.7.0

func (x *IsAuthorizedRequest) GetRequestMethod() string

func (*IsAuthorizedRequest) GetRequestRemoteAddr added in v0.7.0

func (x *IsAuthorizedRequest) GetRequestRemoteAddr() string

func (*IsAuthorizedRequest) GetRequestRequestUri added in v0.7.0

func (x *IsAuthorizedRequest) GetRequestRequestUri() string

func (*IsAuthorizedRequest) GetRequestUrl added in v0.7.0

func (x *IsAuthorizedRequest) GetRequestUrl() string

func (*IsAuthorizedRequest) GetUserToken added in v0.7.0

func (x *IsAuthorizedRequest) GetUserToken() string

func (*IsAuthorizedRequest) ProtoMessage added in v0.7.0

func (*IsAuthorizedRequest) ProtoMessage()

func (*IsAuthorizedRequest) ProtoReflect added in v0.9.0

func (x *IsAuthorizedRequest) ProtoReflect() protoreflect.Message

func (*IsAuthorizedRequest) Reset added in v0.7.0

func (x *IsAuthorizedRequest) Reset()

func (*IsAuthorizedRequest) String added in v0.7.0

func (x *IsAuthorizedRequest) String() string

type IsAuthorizedRequest_Headers added in v0.7.0

type IsAuthorizedRequest_Headers struct {
	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

headers represents key-value pairs in an HTTP header; map[string][]string

func (*IsAuthorizedRequest_Headers) Descriptor deprecated added in v0.7.0

func (*IsAuthorizedRequest_Headers) Descriptor() ([]byte, []int)

Deprecated: Use IsAuthorizedRequest_Headers.ProtoReflect.Descriptor instead.

func (*IsAuthorizedRequest_Headers) GetValue added in v0.7.0

func (x *IsAuthorizedRequest_Headers) GetValue() []string

func (*IsAuthorizedRequest_Headers) ProtoMessage added in v0.7.0

func (*IsAuthorizedRequest_Headers) ProtoMessage()

func (*IsAuthorizedRequest_Headers) ProtoReflect added in v0.9.0

func (*IsAuthorizedRequest_Headers) Reset added in v0.7.0

func (x *IsAuthorizedRequest_Headers) Reset()

func (*IsAuthorizedRequest_Headers) String added in v0.7.0

func (x *IsAuthorizedRequest_Headers) String() string

type UnimplementedAuthorizerServer

type UnimplementedAuthorizerServer struct {
}

UnimplementedAuthorizerServer can be embedded to have forward compatible implementations.

func (*UnimplementedAuthorizerServer) IsAuthorized added in v0.7.0

Directories

Path Synopsis
Package client implements a gRPC client for the authorization service.
Package client implements a gRPC client for the authorization service.

Jump to

Keyboard shortcuts

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