oauth

package
v0.0.0-...-5572bf0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package oauth is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

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

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) Descriptor() ([]byte, []int)

func (*User) GetIvuser

func (m *User) GetIvuser() string

func (*User) GetUuaa

func (m *User) GetUuaa() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

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

Jump to

Keyboard shortcuts

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