Documentation ¶
Overview ¶
Package oauth is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterOauth2ServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOauth2ServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client Oauth2ServiceClient) error
- func RegisterOauth2ServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOauth2ServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server Oauth2ServiceServer) error
- func RegisterOauth2ServiceServer(s *grpc.Server, srv Oauth2ServiceServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)
- func (m *CreateRequest) GetUser() *User
- func (*CreateRequest) ProtoMessage()
- func (m *CreateRequest) Reset()
- func (m *CreateRequest) String() string
- func (m *CreateRequest) XXX_DiscardUnknown()
- func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateRequest) XXX_Merge(src proto.Message)
- func (m *CreateRequest) XXX_Size() int
- func (m *CreateRequest) XXX_Unmarshal(b []byte) error
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)
- func (m *CreateResponse) GetAccessToken() string
- func (m *CreateResponse) GetType() string
- func (*CreateResponse) ProtoMessage()
- func (m *CreateResponse) Reset()
- func (m *CreateResponse) String() string
- func (m *CreateResponse) XXX_DiscardUnknown()
- func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateResponse) XXX_Merge(src proto.Message)
- func (m *CreateResponse) XXX_Size() int
- func (m *CreateResponse) XXX_Unmarshal(b []byte) error
- type Oauth2ServiceClient
- type Oauth2ServiceServer
- type UnimplementedOauth2ServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetIvuser() string
- func (m *User) GetUuaa() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserStoreIdReq
- func (*UserStoreIdReq) Descriptor() ([]byte, []int)
- func (m *UserStoreIdReq) GetUserId() int32
- func (*UserStoreIdReq) ProtoMessage()
- func (m *UserStoreIdReq) Reset()
- func (m *UserStoreIdReq) String() string
- func (m *UserStoreIdReq) XXX_DiscardUnknown()
- func (m *UserStoreIdReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserStoreIdReq) XXX_Merge(src proto.Message)
- func (m *UserStoreIdReq) XXX_Size() int
- func (m *UserStoreIdReq) XXX_Unmarshal(b []byte) error
- type UserStoreIdRes
- func (*UserStoreIdRes) Descriptor() ([]byte, []int)
- func (m *UserStoreIdRes) GetUserId() int32
- func (m *UserStoreIdRes) GetUserJwkEnc() string
- func (m *UserStoreIdRes) GetUserJwkSig() string
- func (*UserStoreIdRes) ProtoMessage()
- func (m *UserStoreIdRes) Reset()
- func (m *UserStoreIdRes) String() string
- func (m *UserStoreIdRes) XXX_DiscardUnknown()
- func (m *UserStoreIdRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserStoreIdRes) XXX_Merge(src proto.Message)
- func (m *UserStoreIdRes) XXX_Size() int
- func (m *UserStoreIdRes) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterOauth2ServiceHandler ¶
func RegisterOauth2ServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOauth2ServiceHandler registers the http handlers for service Oauth2Service to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOauth2ServiceHandlerClient ¶
func RegisterOauth2ServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client Oauth2ServiceClient) error
RegisterOauth2ServiceHandlerClient registers the http handlers for service Oauth2Service to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "Oauth2ServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "Oauth2ServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "Oauth2ServiceClient" to call the correct interceptors.
func RegisterOauth2ServiceHandlerFromEndpoint ¶
func RegisterOauth2ServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOauth2ServiceHandlerFromEndpoint is same as RegisterOauth2ServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOauth2ServiceHandlerServer ¶
func RegisterOauth2ServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server Oauth2ServiceServer) error
RegisterOauth2ServiceHandlerServer registers the http handlers for service Oauth2Service to "mux". UnaryRPC :call Oauth2ServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterOauth2ServiceServer ¶
func RegisterOauth2ServiceServer(s *grpc.Server, srv Oauth2ServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { // Task entity to add User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request data to create new JWT
func (*CreateRequest) Descriptor ¶
func (*CreateRequest) Descriptor() ([]byte, []int)
func (*CreateRequest) GetUser ¶
func (m *CreateRequest) GetUser() *User
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) Reset ¶
func (m *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (m *CreateRequest) String() string
func (*CreateRequest) XXX_DiscardUnknown ¶
func (m *CreateRequest) XXX_DiscardUnknown()
func (*CreateRequest) XXX_Marshal ¶
func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateRequest) XXX_Merge ¶
func (m *CreateRequest) XXX_Merge(src proto.Message)
func (*CreateRequest) XXX_Size ¶
func (m *CreateRequest) XXX_Size() int
func (*CreateRequest) XXX_Unmarshal ¶
func (m *CreateRequest) XXX_Unmarshal(b []byte) error
type CreateResponse ¶
type CreateResponse struct { // Specification of type of JWT(In this case will be Bearer) Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Acces_token is the token value AccessToken string `protobuf:"bytes,2,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Response that contains data for created JWT
func (*CreateResponse) Descriptor ¶
func (*CreateResponse) Descriptor() ([]byte, []int)
func (*CreateResponse) GetAccessToken ¶
func (m *CreateResponse) GetAccessToken() string
func (*CreateResponse) GetType ¶
func (m *CreateResponse) GetType() string
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) Reset ¶
func (m *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (m *CreateResponse) String() string
func (*CreateResponse) XXX_DiscardUnknown ¶
func (m *CreateResponse) XXX_DiscardUnknown()
func (*CreateResponse) XXX_Marshal ¶
func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateResponse) XXX_Merge ¶
func (m *CreateResponse) XXX_Merge(src proto.Message)
func (*CreateResponse) XXX_Size ¶
func (m *CreateResponse) XXX_Size() int
func (*CreateResponse) XXX_Unmarshal ¶
func (m *CreateResponse) XXX_Unmarshal(b []byte) error
type Oauth2ServiceClient ¶
type Oauth2ServiceClient interface { // Create new todo task Create(ctx context.Context, in *UserStoreIdReq, opts ...grpc.CallOption) (*UserStoreIdRes, error) }
Oauth2ServiceClient is the client API for Oauth2Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewOauth2ServiceClient ¶
func NewOauth2ServiceClient(cc *grpc.ClientConn) Oauth2ServiceClient
type Oauth2ServiceServer ¶
type Oauth2ServiceServer interface { // Create new todo task Create(context.Context, *UserStoreIdReq) (*UserStoreIdRes, error) }
Oauth2ServiceServer is the server API for Oauth2Service service.
type UnimplementedOauth2ServiceServer ¶
type UnimplementedOauth2ServiceServer struct { }
UnimplementedOauth2ServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedOauth2ServiceServer) Create ¶
func (*UnimplementedOauth2ServiceServer) Create(ctx context.Context, req *UserStoreIdReq) (*UserStoreIdRes, error)
type User ¶
type User struct { // Uuua claim to put in jwt Uuaa string `protobuf:"bytes,1,opt,name=uuaa,proto3" json:"uuaa,omitempty"` // IVU claim to put in jwt Ivuser string `protobuf:"bytes,2,opt,name=ivuser,proto3" json:"ivuser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
User registred in "xmas"
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UserStoreIdReq ¶
type UserStoreIdReq struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserStoreIdReq) Descriptor ¶
func (*UserStoreIdReq) Descriptor() ([]byte, []int)
func (*UserStoreIdReq) GetUserId ¶
func (m *UserStoreIdReq) GetUserId() int32
func (*UserStoreIdReq) ProtoMessage ¶
func (*UserStoreIdReq) ProtoMessage()
func (*UserStoreIdReq) Reset ¶
func (m *UserStoreIdReq) Reset()
func (*UserStoreIdReq) String ¶
func (m *UserStoreIdReq) String() string
func (*UserStoreIdReq) XXX_DiscardUnknown ¶
func (m *UserStoreIdReq) XXX_DiscardUnknown()
func (*UserStoreIdReq) XXX_Marshal ¶
func (m *UserStoreIdReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserStoreIdReq) XXX_Merge ¶
func (m *UserStoreIdReq) XXX_Merge(src proto.Message)
func (*UserStoreIdReq) XXX_Size ¶
func (m *UserStoreIdReq) XXX_Size() int
func (*UserStoreIdReq) XXX_Unmarshal ¶
func (m *UserStoreIdReq) XXX_Unmarshal(b []byte) error
type UserStoreIdRes ¶
type UserStoreIdRes struct { UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` UserJwkSig string `protobuf:"bytes,2,opt,name=user_jwk_sig,json=userJwkSig,proto3" json:"user_jwk_sig,omitempty"` UserJwkEnc string `protobuf:"bytes,3,opt,name=user_jwk_enc,json=userJwkEnc,proto3" json:"user_jwk_enc,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserStoreIdRes) Descriptor ¶
func (*UserStoreIdRes) Descriptor() ([]byte, []int)
func (*UserStoreIdRes) GetUserId ¶
func (m *UserStoreIdRes) GetUserId() int32
func (*UserStoreIdRes) GetUserJwkEnc ¶
func (m *UserStoreIdRes) GetUserJwkEnc() string
func (*UserStoreIdRes) GetUserJwkSig ¶
func (m *UserStoreIdRes) GetUserJwkSig() string
func (*UserStoreIdRes) ProtoMessage ¶
func (*UserStoreIdRes) ProtoMessage()
func (*UserStoreIdRes) Reset ¶
func (m *UserStoreIdRes) Reset()
func (*UserStoreIdRes) String ¶
func (m *UserStoreIdRes) String() string
func (*UserStoreIdRes) XXX_DiscardUnknown ¶
func (m *UserStoreIdRes) XXX_DiscardUnknown()
func (*UserStoreIdRes) XXX_Marshal ¶
func (m *UserStoreIdRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserStoreIdRes) XXX_Merge ¶
func (m *UserStoreIdRes) XXX_Merge(src proto.Message)
func (*UserStoreIdRes) XXX_Size ¶
func (m *UserStoreIdRes) XXX_Size() int
func (*UserStoreIdRes) XXX_Unmarshal ¶
func (m *UserStoreIdRes) XXX_Unmarshal(b []byte) error