Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer)
- type TokenServiceClient
- type TokenServiceServer
- type UnimplementedTokenServiceServer
- type UnsafeTokenServiceServer
- type VendRequest
- func (*VendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VendRequest) GetConnectionId() string
- func (x *VendRequest) GetOwner() string
- func (*VendRequest) ProtoMessage()
- func (x *VendRequest) ProtoReflect() protoreflect.Message
- func (x *VendRequest) Reset()
- func (x *VendRequest) String() string
- type VendResponse
- func (*VendResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VendResponse) GetAccessToken() string
- func (x *VendResponse) GetApiKey() string
- func (x *VendResponse) GetApiSecret() string
- func (x *VendResponse) GetExpiresAt() *timestamppb.Timestamp
- func (*VendResponse) ProtoMessage()
- func (x *VendResponse) ProtoReflect() protoreflect.Message
- func (x *VendResponse) Reset()
- func (x *VendResponse) String() string
Constants ¶
const (
TokenService_Vend_FullMethodName = "/conduit.v1.TokenService/Vend"
)
Variables ¶
var File_conduit_v1_conduit_proto protoreflect.FileDescriptor
var TokenService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "conduit.v1.TokenService", HandlerType: (*TokenServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Vend", Handler: _TokenService_Vend_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "conduit/v1/conduit.proto", }
TokenService_ServiceDesc is the grpc.ServiceDesc for TokenService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTokenServiceServer ¶
func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer)
Types ¶
type TokenServiceClient ¶
type TokenServiceClient interface {
// Vend returns the connection's current secret, transparently refreshing it
// when it is within the refresh lead of expiry.
Vend(ctx context.Context, in *VendRequest, opts ...grpc.CallOption) (*VendResponse, error)
}
TokenServiceClient is the client API for TokenService 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.
TokenService vends a connection's current provider secret to trusted backend callers (service-to-service). The caller passes the connection's owner; a mismatch yields not-found, never a secret. Refresh tokens never cross the wire — they stay sealed inside Conduit.
func NewTokenServiceClient ¶
func NewTokenServiceClient(cc grpc.ClientConnInterface) TokenServiceClient
type TokenServiceServer ¶
type TokenServiceServer interface {
// Vend returns the connection's current secret, transparently refreshing it
// when it is within the refresh lead of expiry.
Vend(context.Context, *VendRequest) (*VendResponse, error)
}
TokenServiceServer is the server API for TokenService service. All implementations should embed UnimplementedTokenServiceServer for forward compatibility.
TokenService vends a connection's current provider secret to trusted backend callers (service-to-service). The caller passes the connection's owner; a mismatch yields not-found, never a secret. Refresh tokens never cross the wire — they stay sealed inside Conduit.
type UnimplementedTokenServiceServer ¶
type UnimplementedTokenServiceServer struct{}
UnimplementedTokenServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedTokenServiceServer) Vend ¶
func (UnimplementedTokenServiceServer) Vend(context.Context, *VendRequest) (*VendResponse, error)
type UnsafeTokenServiceServer ¶
type UnsafeTokenServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTokenServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TokenServiceServer will result in compilation errors.
type VendRequest ¶
type VendRequest struct {
// owner is the opaque owner key the trusted caller asserts.
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
// connection_id is the connection to vend a secret for.
ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
// contains filtered or unexported fields
}
VendRequest identifies the connection to vend and the owner asserting access.
func (*VendRequest) Descriptor
deprecated
func (*VendRequest) Descriptor() ([]byte, []int)
Deprecated: Use VendRequest.ProtoReflect.Descriptor instead.
func (*VendRequest) GetConnectionId ¶
func (x *VendRequest) GetConnectionId() string
func (*VendRequest) GetOwner ¶
func (x *VendRequest) GetOwner() string
func (*VendRequest) ProtoMessage ¶
func (*VendRequest) ProtoMessage()
func (*VendRequest) ProtoReflect ¶
func (x *VendRequest) ProtoReflect() protoreflect.Message
func (*VendRequest) Reset ¶
func (x *VendRequest) Reset()
func (*VendRequest) String ¶
func (x *VendRequest) String() string
type VendResponse ¶
type VendResponse struct {
// access_token is the OAuth bearer token (empty for API-key connectors).
AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
// api_key is the API key (empty for OAuth connectors).
ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`
// api_secret is the API secret (empty for OAuth connectors).
ApiSecret string `protobuf:"bytes,3,opt,name=api_secret,json=apiSecret,proto3" json:"api_secret,omitempty"`
// expires_at is when the vended secret expires, if known.
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
VendResponse carries the secret material relevant to the connector's auth type. OAuth connectors populate access_token; API-key connectors populate api_key and api_secret.
func (*VendResponse) Descriptor
deprecated
func (*VendResponse) Descriptor() ([]byte, []int)
Deprecated: Use VendResponse.ProtoReflect.Descriptor instead.
func (*VendResponse) GetAccessToken ¶
func (x *VendResponse) GetAccessToken() string
func (*VendResponse) GetApiKey ¶
func (x *VendResponse) GetApiKey() string
func (*VendResponse) GetApiSecret ¶
func (x *VendResponse) GetApiSecret() string
func (*VendResponse) GetExpiresAt ¶
func (x *VendResponse) GetExpiresAt() *timestamppb.Timestamp
func (*VendResponse) ProtoMessage ¶
func (*VendResponse) ProtoMessage()
func (*VendResponse) ProtoReflect ¶
func (x *VendResponse) ProtoReflect() protoreflect.Message
func (*VendResponse) Reset ¶
func (x *VendResponse) Reset()
func (*VendResponse) String ¶
func (x *VendResponse) String() string