Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterOauth2PluginServer(s grpc.ServiceRegistrar, srv Oauth2PluginServer)
- type Enpty
- type GetTokenReq
- type GetUserInfoReq
- type GetUserInfoResp
- func (*GetUserInfoResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoResp) GetProviderUserId() string
- func (x *GetUserInfoResp) GetUsername() string
- func (*GetUserInfoResp) ProtoMessage()
- func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoResp) Reset()
- func (x *GetUserInfoResp) String() string
- type InitReq
- func (*InitReq) Descriptor() ([]byte, []int)deprecated
- func (x *InitReq) GetClientId() string
- func (x *InitReq) GetClientSecret() string
- func (x *InitReq) GetRedirectUrl() string
- func (*InitReq) ProtoMessage()
- func (x *InitReq) ProtoReflect() protoreflect.Message
- func (x *InitReq) Reset()
- func (x *InitReq) String() string
- type NewAuthURLReq
- type NewAuthURLResp
- type Oauth2PluginClient
- type Oauth2PluginServer
- type ProviderResp
- type RefreshTokenReq
- type RefreshTokenResp
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetAccessToken() string
- func (x *Token) GetExpiry() int64
- func (x *Token) GetRefreshToken() string
- func (x *Token) GetTokenType() string
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type UnimplementedOauth2PluginServer
- func (UnimplementedOauth2PluginServer) GetToken(context.Context, *GetTokenReq) (*Token, error)
- func (UnimplementedOauth2PluginServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
- func (UnimplementedOauth2PluginServer) Init(context.Context, *InitReq) (*Enpty, error)
- func (UnimplementedOauth2PluginServer) NewAuthURL(context.Context, *NewAuthURLReq) (*NewAuthURLResp, error)
- func (UnimplementedOauth2PluginServer) Provider(context.Context, *Enpty) (*ProviderResp, error)
- func (UnimplementedOauth2PluginServer) RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error)
- type UnsafeOauth2PluginServer
Constants ¶
const ( Oauth2Plugin_Init_FullMethodName = "/proto.Oauth2Plugin/Init" Oauth2Plugin_Provider_FullMethodName = "/proto.Oauth2Plugin/Provider" Oauth2Plugin_NewAuthURL_FullMethodName = "/proto.Oauth2Plugin/NewAuthURL" Oauth2Plugin_GetToken_FullMethodName = "/proto.Oauth2Plugin/GetToken" Oauth2Plugin_RefreshToken_FullMethodName = "/proto.Oauth2Plugin/RefreshToken" Oauth2Plugin_GetUserInfo_FullMethodName = "/proto.Oauth2Plugin/GetUserInfo" )
Variables ¶
var File_proto_provider_plugin_proto protoreflect.FileDescriptor
var Oauth2Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Oauth2Plugin", HandlerType: (*Oauth2PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Init", Handler: _Oauth2Plugin_Init_Handler, }, { MethodName: "Provider", Handler: _Oauth2Plugin_Provider_Handler, }, { MethodName: "NewAuthURL", Handler: _Oauth2Plugin_NewAuthURL_Handler, }, { MethodName: "GetToken", Handler: _Oauth2Plugin_GetToken_Handler, }, { MethodName: "RefreshToken", Handler: _Oauth2Plugin_RefreshToken_Handler, }, { MethodName: "GetUserInfo", Handler: _Oauth2Plugin_GetUserInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/provider/plugin.proto", }
Oauth2Plugin_ServiceDesc is the grpc.ServiceDesc for Oauth2Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOauth2PluginServer ¶
func RegisterOauth2PluginServer(s grpc.ServiceRegistrar, srv Oauth2PluginServer)
Types ¶
type Enpty ¶
type Enpty struct {
// contains filtered or unexported fields
}
func (*Enpty) Descriptor
deprecated
func (*Enpty) ProtoMessage ¶
func (*Enpty) ProtoMessage()
func (*Enpty) ProtoReflect ¶
func (x *Enpty) ProtoReflect() protoreflect.Message
type GetTokenReq ¶
type GetTokenReq struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*GetTokenReq) Descriptor
deprecated
func (*GetTokenReq) Descriptor() ([]byte, []int)
Deprecated: Use GetTokenReq.ProtoReflect.Descriptor instead.
func (*GetTokenReq) GetCode ¶
func (x *GetTokenReq) GetCode() string
func (*GetTokenReq) ProtoMessage ¶
func (*GetTokenReq) ProtoMessage()
func (*GetTokenReq) ProtoReflect ¶
func (x *GetTokenReq) ProtoReflect() protoreflect.Message
func (*GetTokenReq) Reset ¶
func (x *GetTokenReq) Reset()
func (*GetTokenReq) String ¶
func (x *GetTokenReq) String() string
type GetUserInfoReq ¶
type GetUserInfoReq struct { Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*GetUserInfoReq) Descriptor
deprecated
func (*GetUserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoReq.ProtoReflect.Descriptor instead.
func (*GetUserInfoReq) GetToken ¶
func (x *GetUserInfoReq) GetToken() *Token
func (*GetUserInfoReq) ProtoMessage ¶
func (*GetUserInfoReq) ProtoMessage()
func (*GetUserInfoReq) ProtoReflect ¶
func (x *GetUserInfoReq) ProtoReflect() protoreflect.Message
func (*GetUserInfoReq) Reset ¶
func (x *GetUserInfoReq) Reset()
func (*GetUserInfoReq) String ¶
func (x *GetUserInfoReq) String() string
type GetUserInfoResp ¶
type GetUserInfoResp struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` ProviderUserId string `protobuf:"bytes,2,opt,name=provider_user_id,json=providerUserId,proto3" json:"provider_user_id,omitempty"` // contains filtered or unexported fields }
func (*GetUserInfoResp) Descriptor
deprecated
func (*GetUserInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoResp.ProtoReflect.Descriptor instead.
func (*GetUserInfoResp) GetProviderUserId ¶
func (x *GetUserInfoResp) GetProviderUserId() string
func (*GetUserInfoResp) GetUsername ¶
func (x *GetUserInfoResp) GetUsername() string
func (*GetUserInfoResp) ProtoMessage ¶
func (*GetUserInfoResp) ProtoMessage()
func (*GetUserInfoResp) ProtoReflect ¶
func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
func (*GetUserInfoResp) Reset ¶
func (x *GetUserInfoResp) Reset()
func (*GetUserInfoResp) String ¶
func (x *GetUserInfoResp) String() string
type InitReq ¶
type InitReq struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` RedirectUrl string `protobuf:"bytes,3,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty"` // contains filtered or unexported fields }
func (*InitReq) Descriptor
deprecated
func (*InitReq) GetClientId ¶
func (*InitReq) GetClientSecret ¶
func (*InitReq) GetRedirectUrl ¶
func (*InitReq) ProtoMessage ¶
func (*InitReq) ProtoMessage()
func (*InitReq) ProtoReflect ¶
func (x *InitReq) ProtoReflect() protoreflect.Message
type NewAuthURLReq ¶
type NewAuthURLReq struct { State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` // contains filtered or unexported fields }
func (*NewAuthURLReq) Descriptor
deprecated
func (*NewAuthURLReq) Descriptor() ([]byte, []int)
Deprecated: Use NewAuthURLReq.ProtoReflect.Descriptor instead.
func (*NewAuthURLReq) GetState ¶
func (x *NewAuthURLReq) GetState() string
func (*NewAuthURLReq) ProtoMessage ¶
func (*NewAuthURLReq) ProtoMessage()
func (*NewAuthURLReq) ProtoReflect ¶
func (x *NewAuthURLReq) ProtoReflect() protoreflect.Message
func (*NewAuthURLReq) Reset ¶
func (x *NewAuthURLReq) Reset()
func (*NewAuthURLReq) String ¶
func (x *NewAuthURLReq) String() string
type NewAuthURLResp ¶
type NewAuthURLResp struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*NewAuthURLResp) Descriptor
deprecated
func (*NewAuthURLResp) Descriptor() ([]byte, []int)
Deprecated: Use NewAuthURLResp.ProtoReflect.Descriptor instead.
func (*NewAuthURLResp) GetUrl ¶
func (x *NewAuthURLResp) GetUrl() string
func (*NewAuthURLResp) ProtoMessage ¶
func (*NewAuthURLResp) ProtoMessage()
func (*NewAuthURLResp) ProtoReflect ¶
func (x *NewAuthURLResp) ProtoReflect() protoreflect.Message
func (*NewAuthURLResp) Reset ¶
func (x *NewAuthURLResp) Reset()
func (*NewAuthURLResp) String ¶
func (x *NewAuthURLResp) String() string
type Oauth2PluginClient ¶
type Oauth2PluginClient interface { Init(ctx context.Context, in *InitReq, opts ...grpc.CallOption) (*Enpty, error) Provider(ctx context.Context, in *Enpty, opts ...grpc.CallOption) (*ProviderResp, error) NewAuthURL(ctx context.Context, in *NewAuthURLReq, opts ...grpc.CallOption) (*NewAuthURLResp, error) GetToken(ctx context.Context, in *GetTokenReq, opts ...grpc.CallOption) (*Token, error) RefreshToken(ctx context.Context, in *RefreshTokenReq, opts ...grpc.CallOption) (*RefreshTokenResp, error) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) }
Oauth2PluginClient is the client API for Oauth2Plugin service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewOauth2PluginClient ¶
func NewOauth2PluginClient(cc grpc.ClientConnInterface) Oauth2PluginClient
type Oauth2PluginServer ¶
type Oauth2PluginServer interface { Init(context.Context, *InitReq) (*Enpty, error) Provider(context.Context, *Enpty) (*ProviderResp, error) NewAuthURL(context.Context, *NewAuthURLReq) (*NewAuthURLResp, error) GetToken(context.Context, *GetTokenReq) (*Token, error) RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) // contains filtered or unexported methods }
Oauth2PluginServer is the server API for Oauth2Plugin service. All implementations must embed UnimplementedOauth2PluginServer for forward compatibility
type ProviderResp ¶
type ProviderResp struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*ProviderResp) Descriptor
deprecated
func (*ProviderResp) Descriptor() ([]byte, []int)
Deprecated: Use ProviderResp.ProtoReflect.Descriptor instead.
func (*ProviderResp) GetName ¶
func (x *ProviderResp) GetName() string
func (*ProviderResp) ProtoMessage ¶
func (*ProviderResp) ProtoMessage()
func (*ProviderResp) ProtoReflect ¶
func (x *ProviderResp) ProtoReflect() protoreflect.Message
func (*ProviderResp) Reset ¶
func (x *ProviderResp) Reset()
func (*ProviderResp) String ¶
func (x *ProviderResp) String() string
type RefreshTokenReq ¶
type RefreshTokenReq struct { RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
func (*RefreshTokenReq) Descriptor
deprecated
func (*RefreshTokenReq) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenReq.ProtoReflect.Descriptor instead.
func (*RefreshTokenReq) GetRefreshToken ¶
func (x *RefreshTokenReq) GetRefreshToken() string
func (*RefreshTokenReq) ProtoMessage ¶
func (*RefreshTokenReq) ProtoMessage()
func (*RefreshTokenReq) ProtoReflect ¶
func (x *RefreshTokenReq) ProtoReflect() protoreflect.Message
func (*RefreshTokenReq) Reset ¶
func (x *RefreshTokenReq) Reset()
func (*RefreshTokenReq) String ¶
func (x *RefreshTokenReq) String() string
type RefreshTokenResp ¶
type RefreshTokenResp struct { Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*RefreshTokenResp) Descriptor
deprecated
func (*RefreshTokenResp) Descriptor() ([]byte, []int)
Deprecated: Use RefreshTokenResp.ProtoReflect.Descriptor instead.
func (*RefreshTokenResp) GetToken ¶
func (x *RefreshTokenResp) GetToken() *Token
func (*RefreshTokenResp) ProtoMessage ¶
func (*RefreshTokenResp) ProtoMessage()
func (*RefreshTokenResp) ProtoReflect ¶
func (x *RefreshTokenResp) ProtoReflect() protoreflect.Message
func (*RefreshTokenResp) Reset ¶
func (x *RefreshTokenResp) Reset()
func (*RefreshTokenResp) String ¶
func (x *RefreshTokenResp) String() string
type Token ¶
type Token struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) GetAccessToken ¶
func (*Token) GetRefreshToken ¶
func (*Token) GetTokenType ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedOauth2PluginServer ¶
type UnimplementedOauth2PluginServer struct { }
UnimplementedOauth2PluginServer must be embedded to have forward compatible implementations.
func (UnimplementedOauth2PluginServer) GetToken ¶
func (UnimplementedOauth2PluginServer) GetToken(context.Context, *GetTokenReq) (*Token, error)
func (UnimplementedOauth2PluginServer) GetUserInfo ¶
func (UnimplementedOauth2PluginServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
func (UnimplementedOauth2PluginServer) NewAuthURL ¶
func (UnimplementedOauth2PluginServer) NewAuthURL(context.Context, *NewAuthURLReq) (*NewAuthURLResp, error)
func (UnimplementedOauth2PluginServer) Provider ¶
func (UnimplementedOauth2PluginServer) Provider(context.Context, *Enpty) (*ProviderResp, error)
func (UnimplementedOauth2PluginServer) RefreshToken ¶
func (UnimplementedOauth2PluginServer) RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error)
type UnsafeOauth2PluginServer ¶
type UnsafeOauth2PluginServer interface {
// contains filtered or unexported methods
}
UnsafeOauth2PluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to Oauth2PluginServer will result in compilation errors.