Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)
- type AuthenticationClient
- type AuthenticationServer
- type Subject
- type UnimplementedAuthenticationServer
- type UnsafeAuthenticationServer
- type ValidateCredentialRequest
- func (*ValidateCredentialRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateCredentialRequest) GetCredential() string
- func (*ValidateCredentialRequest) ProtoMessage()
- func (x *ValidateCredentialRequest) ProtoReflect() protoreflect.Message
- func (x *ValidateCredentialRequest) Reset()
- func (x *ValidateCredentialRequest) String() string
- type ValidateCredentialResponse
- func (*ValidateCredentialResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateCredentialResponse) GetResult() ValidateCredentialResponse_Result
- func (x *ValidateCredentialResponse) GetSubject() *Subject
- func (*ValidateCredentialResponse) ProtoMessage()
- func (x *ValidateCredentialResponse) ProtoReflect() protoreflect.Message
- func (x *ValidateCredentialResponse) Reset()
- func (x *ValidateCredentialResponse) String() string
- type ValidateCredentialResponse_Result
- func (ValidateCredentialResponse_Result) Descriptor() protoreflect.EnumDescriptor
- func (x ValidateCredentialResponse_Result) Enum() *ValidateCredentialResponse_Result
- func (ValidateCredentialResponse_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x ValidateCredentialResponse_Result) Number() protoreflect.EnumNumber
- func (x ValidateCredentialResponse_Result) String() string
- func (ValidateCredentialResponse_Result) Type() protoreflect.EnumType
Constants ¶
const (
Authentication_ValidateCredential_FullMethodName = "/runtime.iam.v1.Authentication/ValidateCredential"
)
Variables ¶
var ( ValidateCredentialResponse_Result_name = map[int32]string{ 0: "RESULT_VALID", 1: "RESULT_INVALID", } ValidateCredentialResponse_Result_value = map[string]int32{ "RESULT_VALID": 0, "RESULT_INVALID": 1, } )
Enum value maps for ValidateCredentialResponse_Result.
var Authentication_ServiceDesc = grpc.ServiceDesc{ ServiceName: "runtime.iam.v1.Authentication", HandlerType: (*AuthenticationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ValidateCredential", Handler: _Authentication_ValidateCredential_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "authentication/authentication.proto", }
Authentication_ServiceDesc is the grpc.ServiceDesc for Authentication service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_authentication_authentication_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthenticationServer ¶
func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)
Types ¶
type AuthenticationClient ¶
type AuthenticationClient interface {
ValidateCredential(ctx context.Context, in *ValidateCredentialRequest, opts ...grpc.CallOption) (*ValidateCredentialResponse, error)
}
AuthenticationClient is the client API for Authentication 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 NewAuthenticationClient ¶
func NewAuthenticationClient(cc grpc.ClientConnInterface) AuthenticationClient
type AuthenticationServer ¶
type AuthenticationServer interface { ValidateCredential(context.Context, *ValidateCredentialRequest) (*ValidateCredentialResponse, error) // contains filtered or unexported methods }
AuthenticationServer is the server API for Authentication service. All implementations must embed UnimplementedAuthenticationServer for forward compatibility
type Subject ¶ added in v0.3.0
type Subject struct { // subject_id is the ID of the subject. SubjectId string `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"` // claims is a set of claims about the subject. Claims *structpb.Struct `protobuf:"bytes,2,opt,name=claims,proto3" json:"claims,omitempty"` // contains filtered or unexported fields }
func (*Subject) Descriptor
deprecated
added in
v0.3.0
func (*Subject) GetSubjectId ¶ added in v0.3.0
func (*Subject) ProtoMessage ¶ added in v0.3.0
func (*Subject) ProtoMessage()
func (*Subject) ProtoReflect ¶ added in v0.3.0
func (x *Subject) ProtoReflect() protoreflect.Message
type UnimplementedAuthenticationServer ¶
type UnimplementedAuthenticationServer struct { }
UnimplementedAuthenticationServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthenticationServer) ValidateCredential ¶ added in v0.2.0
func (UnimplementedAuthenticationServer) ValidateCredential(context.Context, *ValidateCredentialRequest) (*ValidateCredentialResponse, error)
type UnsafeAuthenticationServer ¶
type UnsafeAuthenticationServer interface {
// contains filtered or unexported methods
}
UnsafeAuthenticationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticationServer will result in compilation errors.
type ValidateCredentialRequest ¶ added in v0.2.0
type ValidateCredentialRequest struct { // credential is the literal credential for a subject (such as a bearer token) passed to the // application with no transformations applied. Credential string `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` // contains filtered or unexported fields }
func (*ValidateCredentialRequest) Descriptor
deprecated
added in
v0.2.0
func (*ValidateCredentialRequest) Descriptor() ([]byte, []int)
Deprecated: Use ValidateCredentialRequest.ProtoReflect.Descriptor instead.
func (*ValidateCredentialRequest) GetCredential ¶ added in v0.2.0
func (x *ValidateCredentialRequest) GetCredential() string
func (*ValidateCredentialRequest) ProtoMessage ¶ added in v0.2.0
func (*ValidateCredentialRequest) ProtoMessage()
func (*ValidateCredentialRequest) ProtoReflect ¶ added in v0.2.0
func (x *ValidateCredentialRequest) ProtoReflect() protoreflect.Message
func (*ValidateCredentialRequest) Reset ¶ added in v0.2.0
func (x *ValidateCredentialRequest) Reset()
func (*ValidateCredentialRequest) String ¶ added in v0.2.0
func (x *ValidateCredentialRequest) String() string
type ValidateCredentialResponse ¶ added in v0.2.0
type ValidateCredentialResponse struct { // Result represents the decision made about whether the credential is valid. If it is valid, // this field should be set to RESULT_VALID and subject should be set. Otherwise, this field // should be set to RESULT_INVALID. Result ValidateCredentialResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=runtime.iam.v1.ValidateCredentialResponse_Result" json:"result,omitempty"` // Subject represents the actor the given token identifies. If the given credential is not valid, // (i.e., result is set to RESULT_INVALID), this field's value is undefined. Subject *Subject `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` // contains filtered or unexported fields }
func (*ValidateCredentialResponse) Descriptor
deprecated
added in
v0.2.0
func (*ValidateCredentialResponse) Descriptor() ([]byte, []int)
Deprecated: Use ValidateCredentialResponse.ProtoReflect.Descriptor instead.
func (*ValidateCredentialResponse) GetResult ¶ added in v0.3.0
func (x *ValidateCredentialResponse) GetResult() ValidateCredentialResponse_Result
func (*ValidateCredentialResponse) GetSubject ¶ added in v0.3.0
func (x *ValidateCredentialResponse) GetSubject() *Subject
func (*ValidateCredentialResponse) ProtoMessage ¶ added in v0.2.0
func (*ValidateCredentialResponse) ProtoMessage()
func (*ValidateCredentialResponse) ProtoReflect ¶ added in v0.2.0
func (x *ValidateCredentialResponse) ProtoReflect() protoreflect.Message
func (*ValidateCredentialResponse) Reset ¶ added in v0.2.0
func (x *ValidateCredentialResponse) Reset()
func (*ValidateCredentialResponse) String ¶ added in v0.2.0
func (x *ValidateCredentialResponse) String() string
type ValidateCredentialResponse_Result ¶ added in v0.3.0
type ValidateCredentialResponse_Result int32
const ( ValidateCredentialResponse_RESULT_VALID ValidateCredentialResponse_Result = 0 ValidateCredentialResponse_RESULT_INVALID ValidateCredentialResponse_Result = 1 )
func (ValidateCredentialResponse_Result) Descriptor ¶ added in v0.3.0
func (ValidateCredentialResponse_Result) Descriptor() protoreflect.EnumDescriptor
func (ValidateCredentialResponse_Result) Enum ¶ added in v0.3.0
func (x ValidateCredentialResponse_Result) Enum() *ValidateCredentialResponse_Result
func (ValidateCredentialResponse_Result) EnumDescriptor
deprecated
added in
v0.3.0
func (ValidateCredentialResponse_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use ValidateCredentialResponse_Result.Descriptor instead.
func (ValidateCredentialResponse_Result) Number ¶ added in v0.3.0
func (x ValidateCredentialResponse_Result) Number() protoreflect.EnumNumber
func (ValidateCredentialResponse_Result) String ¶ added in v0.3.0
func (x ValidateCredentialResponse_Result) String() string
func (ValidateCredentialResponse_Result) Type ¶ added in v0.3.0
func (ValidateCredentialResponse_Result) Type() protoreflect.EnumType