Documentation ¶
Overview ¶
Package v1 contains the v1 GRPC client and server definitions for implementing OIDC interactions for the Platform.
Index ¶
- Constants
- Variables
- func RegisterSecurityTokenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSecurityTokenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecurityTokenServiceClient) error
- func RegisterSecurityTokenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSecurityTokenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecurityTokenServiceServer) error
- func RegisterSecurityTokenServiceServer(s grpc.ServiceRegistrar, srv SecurityTokenServiceServer)
- type ClientOption
- type Clients
- type ExchangeRefreshTokenRequest
- func (*ExchangeRefreshTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExchangeRefreshTokenRequest) GetAud() []string
- func (x *ExchangeRefreshTokenRequest) GetCap() []string
- func (x *ExchangeRefreshTokenRequest) GetScope() string
- func (*ExchangeRefreshTokenRequest) ProtoMessage()
- func (x *ExchangeRefreshTokenRequest) ProtoReflect() protoreflect.Message
- func (x *ExchangeRefreshTokenRequest) Reset()
- func (x *ExchangeRefreshTokenRequest) String() string
- type ExchangeRequest
- func (*ExchangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExchangeRequest) GetAud() []string
- func (x *ExchangeRequest) GetCap() []string
- func (x *ExchangeRequest) GetIdentity() string
- func (x *ExchangeRequest) GetIdentityProvider() string
- func (x *ExchangeRequest) GetScope() string
- func (*ExchangeRequest) ProtoMessage()
- func (x *ExchangeRequest) ProtoReflect() protoreflect.Message
- func (x *ExchangeRequest) Reset()
- func (x *ExchangeRequest) String() string
- type RawToken
- type SecurityTokenServiceClient
- type SecurityTokenServiceServer
- type TokenPair
- type UnimplementedSecurityTokenServiceServer
- type UnsafeSecurityTokenServiceServer
Constants ¶
const ( SecurityTokenService_Exchange_FullMethodName = "/chainguard.platform.oidc.SecurityTokenService/Exchange" SecurityTokenService_ExchangeRefreshToken_FullMethodName = "/chainguard.platform.oidc.SecurityTokenService/ExchangeRefreshToken" )
Variables ¶
var File_oidc_platform_proto protoreflect.FileDescriptor
var SecurityTokenService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chainguard.platform.oidc.SecurityTokenService", HandlerType: (*SecurityTokenServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Exchange", Handler: _SecurityTokenService_Exchange_Handler, }, { MethodName: "ExchangeRefreshToken", Handler: _SecurityTokenService_ExchangeRefreshToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "oidc.platform.proto", }
SecurityTokenService_ServiceDesc is the grpc.ServiceDesc for SecurityTokenService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSecurityTokenServiceHandler ¶
func RegisterSecurityTokenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSecurityTokenServiceHandler registers the http handlers for service SecurityTokenService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSecurityTokenServiceHandlerClient ¶
func RegisterSecurityTokenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecurityTokenServiceClient) error
RegisterSecurityTokenServiceHandlerClient registers the http handlers for service SecurityTokenService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecurityTokenServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecurityTokenServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SecurityTokenServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterSecurityTokenServiceHandlerFromEndpoint ¶
func RegisterSecurityTokenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSecurityTokenServiceHandlerFromEndpoint is same as RegisterSecurityTokenServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSecurityTokenServiceHandlerServer ¶
func RegisterSecurityTokenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecurityTokenServiceServer) error
RegisterSecurityTokenServiceHandlerServer registers the http handlers for service SecurityTokenService to "mux". UnaryRPC :call SecurityTokenServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSecurityTokenServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterSecurityTokenServiceServer ¶
func RegisterSecurityTokenServiceServer(s grpc.ServiceRegistrar, srv SecurityTokenServiceServer)
Types ¶
type ClientOption ¶
type ClientOption func(*options)
func WithUserAgent ¶
func WithUserAgent(agent string) ClientOption
type Clients ¶
type Clients interface { STS() SecurityTokenServiceClient Close() error }
func NewClients ¶
func NewClientsFromConnection ¶
func NewClientsFromConnection(conn *grpc.ClientConn) Clients
type ExchangeRefreshTokenRequest ¶ added in v0.1.11
type ExchangeRefreshTokenRequest struct { Aud []string `protobuf:"bytes,1,rep,name=aud,proto3" json:"aud,omitempty"` Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` // List of capabilities to request for the token. Cap []string `protobuf:"bytes,3,rep,name=cap,proto3" json:"cap,omitempty"` // contains filtered or unexported fields }
func (*ExchangeRefreshTokenRequest) Descriptor
deprecated
added in
v0.1.11
func (*ExchangeRefreshTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExchangeRefreshTokenRequest.ProtoReflect.Descriptor instead.
func (*ExchangeRefreshTokenRequest) GetAud ¶ added in v0.1.11
func (x *ExchangeRefreshTokenRequest) GetAud() []string
func (*ExchangeRefreshTokenRequest) GetCap ¶ added in v0.1.11
func (x *ExchangeRefreshTokenRequest) GetCap() []string
func (*ExchangeRefreshTokenRequest) GetScope ¶ added in v0.1.11
func (x *ExchangeRefreshTokenRequest) GetScope() string
func (*ExchangeRefreshTokenRequest) ProtoMessage ¶ added in v0.1.11
func (*ExchangeRefreshTokenRequest) ProtoMessage()
func (*ExchangeRefreshTokenRequest) ProtoReflect ¶ added in v0.1.11
func (x *ExchangeRefreshTokenRequest) ProtoReflect() protoreflect.Message
func (*ExchangeRefreshTokenRequest) Reset ¶ added in v0.1.11
func (x *ExchangeRefreshTokenRequest) Reset()
func (*ExchangeRefreshTokenRequest) String ¶ added in v0.1.11
func (x *ExchangeRefreshTokenRequest) String() string
type ExchangeRequest ¶
type ExchangeRequest struct { Aud []string `protobuf:"bytes,1,rep,name=aud,proto3" json:"aud,omitempty"` Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` // List of capabilities to request for the token. Cap []string `protobuf:"bytes,5,rep,name=cap,proto3" json:"cap,omitempty"` // Empty or the UIDP of the custom identity provider. IdentityProvider string `protobuf:"bytes,7,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"` // contains filtered or unexported fields }
func (*ExchangeRequest) Descriptor
deprecated
func (*ExchangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExchangeRequest.ProtoReflect.Descriptor instead.
func (*ExchangeRequest) GetAud ¶
func (x *ExchangeRequest) GetAud() []string
func (*ExchangeRequest) GetCap ¶
func (x *ExchangeRequest) GetCap() []string
func (*ExchangeRequest) GetIdentity ¶
func (x *ExchangeRequest) GetIdentity() string
func (*ExchangeRequest) GetIdentityProvider ¶ added in v0.1.25
func (x *ExchangeRequest) GetIdentityProvider() string
func (*ExchangeRequest) GetScope ¶
func (x *ExchangeRequest) GetScope() string
func (*ExchangeRequest) ProtoMessage ¶
func (*ExchangeRequest) ProtoMessage()
func (*ExchangeRequest) ProtoReflect ¶
func (x *ExchangeRequest) ProtoReflect() protoreflect.Message
func (*ExchangeRequest) Reset ¶
func (x *ExchangeRequest) Reset()
func (*ExchangeRequest) String ¶
func (x *ExchangeRequest) String() string
type RawToken ¶
type RawToken struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
func (*RawToken) Descriptor
deprecated
func (*RawToken) GetRefreshToken ¶ added in v0.1.25
func (*RawToken) ProtoMessage ¶
func (*RawToken) ProtoMessage()
func (*RawToken) ProtoReflect ¶
func (x *RawToken) ProtoReflect() protoreflect.Message
type SecurityTokenServiceClient ¶
type SecurityTokenServiceClient interface { Exchange(ctx context.Context, in *ExchangeRequest, opts ...grpc.CallOption) (*RawToken, error) ExchangeRefreshToken(ctx context.Context, in *ExchangeRefreshTokenRequest, opts ...grpc.CallOption) (*TokenPair, error) }
SecurityTokenServiceClient is the client API for SecurityTokenService 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 NewSecurityTokenServiceClient ¶
func NewSecurityTokenServiceClient(cc grpc.ClientConnInterface) SecurityTokenServiceClient
type SecurityTokenServiceServer ¶
type SecurityTokenServiceServer interface { Exchange(context.Context, *ExchangeRequest) (*RawToken, error) ExchangeRefreshToken(context.Context, *ExchangeRefreshTokenRequest) (*TokenPair, error) // contains filtered or unexported methods }
SecurityTokenServiceServer is the server API for SecurityTokenService service. All implementations must embed UnimplementedSecurityTokenServiceServer for forward compatibility.
type TokenPair ¶ added in v0.1.11
type TokenPair struct { Token *RawToken `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` RefreshToken *RawToken `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // contains filtered or unexported fields }
ExchangeRefreshToken returns a pair of token, in order to allow refresh token to also be rotated.
func (*TokenPair) Descriptor
deprecated
added in
v0.1.11
func (*TokenPair) GetRefreshToken ¶ added in v0.1.11
func (*TokenPair) ProtoMessage ¶ added in v0.1.11
func (*TokenPair) ProtoMessage()
func (*TokenPair) ProtoReflect ¶ added in v0.1.11
func (x *TokenPair) ProtoReflect() protoreflect.Message
type UnimplementedSecurityTokenServiceServer ¶
type UnimplementedSecurityTokenServiceServer struct{}
UnimplementedSecurityTokenServiceServer must 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 (UnimplementedSecurityTokenServiceServer) Exchange ¶
func (UnimplementedSecurityTokenServiceServer) Exchange(context.Context, *ExchangeRequest) (*RawToken, error)
func (UnimplementedSecurityTokenServiceServer) ExchangeRefreshToken ¶ added in v0.1.11
func (UnimplementedSecurityTokenServiceServer) ExchangeRefreshToken(context.Context, *ExchangeRefreshTokenRequest) (*TokenPair, error)
type UnsafeSecurityTokenServiceServer ¶
type UnsafeSecurityTokenServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSecurityTokenServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SecurityTokenServiceServer will result in compilation errors.