authentication

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Authentication_ValidateCredential_FullMethodName = "/runtime.iam.v1.Authentication/ValidateCredential"
)

Variables

View Source
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.

View Source
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)

View Source
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.

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

Deprecated: Use Subject.ProtoReflect.Descriptor instead.

func (*Subject) GetClaims added in v0.3.0

func (x *Subject) GetClaims() *structpb.Struct

func (*Subject) GetSubjectId added in v0.3.0

func (x *Subject) GetSubjectId() string

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

func (*Subject) Reset added in v0.3.0

func (x *Subject) Reset()

func (*Subject) String added in v0.3.0

func (x *Subject) String() string

type UnimplementedAuthenticationServer

type UnimplementedAuthenticationServer struct {
}

UnimplementedAuthenticationServer must be embedded to have forward compatible implementations.

func (UnimplementedAuthenticationServer) ValidateCredential added in v0.2.0

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 (*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 (*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 (*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) Enum added in v0.3.0

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 (ValidateCredentialResponse_Result) String added in v0.3.0

func (ValidateCredentialResponse_Result) Type added in v0.3.0

Jump to

Keyboard shortcuts

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