pb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDPTokenService_CreateToken_FullMethodName     = "/idp_token.IDPTokenService/CreateToken"
	IDPTokenService_IntrospectToken_FullMethodName = "/idp_token.IDPTokenService/IntrospectToken"
)

Variables

View Source
var File_idp_token_proto protoreflect.FileDescriptor
View Source
var IDPTokenService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "idp_token.IDPTokenService",
	HandlerType: (*IDPTokenServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateToken",
			Handler:    _IDPTokenService_CreateToken_Handler,
		},
		{
			MethodName: "IntrospectToken",
			Handler:    _IDPTokenService_IntrospectToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "idp_token.proto",
}

IDPTokenService_ServiceDesc is the grpc.ServiceDesc for IDPTokenService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterIDPTokenServiceServer

func RegisterIDPTokenServiceServer(s grpc.ServiceRegistrar, srv IDPTokenServiceServer)

Types

type AccessTokenScope

type AccessTokenScope struct {
	TenantUuid        string `protobuf:"bytes,1,opt,name=tenant_uuid,json=tenantUuid,proto3" json:"tenant_uuid,omitempty"`
	TenantIntId       int64  `protobuf:"varint,2,opt,name=tenant_int_id,json=tenantIntId,proto3" json:"tenant_int_id,omitempty"`
	ResourceServer    string `protobuf:"bytes,3,opt,name=ResourceServer,proto3" json:"ResourceServer,omitempty"`
	ResourceNamespace string `protobuf:"bytes,4,opt,name=ResourceNamespace,proto3" json:"ResourceNamespace,omitempty"`
	ResourcePath      string `protobuf:"bytes,5,opt,name=ResourcePath,proto3" json:"ResourcePath,omitempty"`
	RoleName          string `protobuf:"bytes,6,opt,name=RoleName,proto3" json:"RoleName,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessTokenScope) Descriptor deprecated

func (*AccessTokenScope) Descriptor() ([]byte, []int)

Deprecated: Use AccessTokenScope.ProtoReflect.Descriptor instead.

func (*AccessTokenScope) GetResourceNamespace

func (x *AccessTokenScope) GetResourceNamespace() string

func (*AccessTokenScope) GetResourcePath

func (x *AccessTokenScope) GetResourcePath() string

func (*AccessTokenScope) GetResourceServer

func (x *AccessTokenScope) GetResourceServer() string

func (*AccessTokenScope) GetRoleName

func (x *AccessTokenScope) GetRoleName() string

func (*AccessTokenScope) GetTenantIntId

func (x *AccessTokenScope) GetTenantIntId() int64

func (*AccessTokenScope) GetTenantUuid

func (x *AccessTokenScope) GetTenantUuid() string

func (*AccessTokenScope) ProtoMessage

func (*AccessTokenScope) ProtoMessage()

func (*AccessTokenScope) ProtoReflect

func (x *AccessTokenScope) ProtoReflect() protoreflect.Message

func (*AccessTokenScope) Reset

func (x *AccessTokenScope) Reset()

func (*AccessTokenScope) String

func (x *AccessTokenScope) String() string

type CreateTokenRequest

type CreateTokenRequest struct {
	GrantType    string `protobuf:"bytes,1,opt,name=grant_type,json=grantType,proto3" json:"grant_type,omitempty"` // example: urn:ietf:params:oauth:grant-type:jwt-bearer
	Assertion    string `protobuf:"bytes,2,opt,name=assertion,proto3" json:"assertion,omitempty"`
	TokenVersion uint32 `protobuf:"varint,3,opt,name=token_version,json=tokenVersion,proto3" json:"token_version,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenRequest) Descriptor deprecated

func (*CreateTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateTokenRequest.ProtoReflect.Descriptor instead.

func (*CreateTokenRequest) GetAssertion

func (x *CreateTokenRequest) GetAssertion() string

func (*CreateTokenRequest) GetGrantType

func (x *CreateTokenRequest) GetGrantType() string

func (*CreateTokenRequest) GetTokenVersion

func (x *CreateTokenRequest) GetTokenVersion() uint32

func (*CreateTokenRequest) ProtoMessage

func (*CreateTokenRequest) ProtoMessage()

func (*CreateTokenRequest) ProtoReflect

func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message

func (*CreateTokenRequest) Reset

func (x *CreateTokenRequest) Reset()

func (*CreateTokenRequest) String

func (x *CreateTokenRequest) String() string

type CreateTokenResponse

type CreateTokenResponse 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"`
	ExpiresIn   int64  `protobuf:"varint,3,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateTokenResponse) Descriptor deprecated

func (*CreateTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateTokenResponse.ProtoReflect.Descriptor instead.

func (*CreateTokenResponse) GetAccessToken

func (x *CreateTokenResponse) GetAccessToken() string

func (*CreateTokenResponse) GetExpiresIn

func (x *CreateTokenResponse) GetExpiresIn() int64

func (*CreateTokenResponse) GetTokenType

func (x *CreateTokenResponse) GetTokenType() string

func (*CreateTokenResponse) ProtoMessage

func (*CreateTokenResponse) ProtoMessage()

func (*CreateTokenResponse) ProtoReflect

func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message

func (*CreateTokenResponse) Reset

func (x *CreateTokenResponse) Reset()

func (*CreateTokenResponse) String

func (x *CreateTokenResponse) String() string

type IDPTokenServiceClient

type IDPTokenServiceClient interface {
	// CreateToken creates a new token based on the provided assertion.
	// Now only JWT_BEARER (urn:ietf:params:oauth:grant-type:jwt-bearer) grant type is supported.
	CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error)
	// IntrospectToken returns information about the token including its scopes.
	// The token is considered active if it 1) is not expired; 2) is not revoked; 3) has has the valid signature.
	IntrospectToken(ctx context.Context, in *IntrospectTokenRequest, opts ...grpc.CallOption) (*IntrospectTokenResponse, error)
}

IDPTokenServiceClient is the client API for IDPTokenService 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 IDPTokenServiceServer

type IDPTokenServiceServer interface {
	// CreateToken creates a new token based on the provided assertion.
	// Now only JWT_BEARER (urn:ietf:params:oauth:grant-type:jwt-bearer) grant type is supported.
	CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
	// IntrospectToken returns information about the token including its scopes.
	// The token is considered active if it 1) is not expired; 2) is not revoked; 3) has has the valid signature.
	IntrospectToken(context.Context, *IntrospectTokenRequest) (*IntrospectTokenResponse, error)
	// contains filtered or unexported methods
}

IDPTokenServiceServer is the server API for IDPTokenService service. All implementations must embed UnimplementedIDPTokenServiceServer for forward compatibility

type IntrospectTokenRequest

type IntrospectTokenRequest struct {
	Token       string                      `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	ScopeFilter []*IntrospectionScopeFilter `protobuf:"bytes,2,rep,name=scope_filter,json=scopeFilter,proto3" json:"scope_filter,omitempty"`
	// contains filtered or unexported fields
}

func (*IntrospectTokenRequest) Descriptor deprecated

func (*IntrospectTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use IntrospectTokenRequest.ProtoReflect.Descriptor instead.

func (*IntrospectTokenRequest) GetScopeFilter

func (x *IntrospectTokenRequest) GetScopeFilter() []*IntrospectionScopeFilter

func (*IntrospectTokenRequest) GetToken

func (x *IntrospectTokenRequest) GetToken() string

func (*IntrospectTokenRequest) ProtoMessage

func (*IntrospectTokenRequest) ProtoMessage()

func (*IntrospectTokenRequest) ProtoReflect

func (x *IntrospectTokenRequest) ProtoReflect() protoreflect.Message

func (*IntrospectTokenRequest) Reset

func (x *IntrospectTokenRequest) Reset()

func (*IntrospectTokenRequest) String

func (x *IntrospectTokenRequest) String() string

type IntrospectTokenResponse

type IntrospectTokenResponse struct {
	Active          bool                `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
	TokenType       string              `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"`
	Exp             int64               `protobuf:"varint,3,opt,name=exp,proto3" json:"exp,omitempty"`
	Aud             []string            `protobuf:"bytes,4,rep,name=aud,proto3" json:"aud,omitempty"`
	Jti             string              `protobuf:"bytes,5,opt,name=jti,proto3" json:"jti,omitempty"`
	Iss             string              `protobuf:"bytes,6,opt,name=iss,proto3" json:"iss,omitempty"`
	Sub             string              `protobuf:"bytes,7,opt,name=sub,proto3" json:"sub,omitempty"`
	SubType         string              `protobuf:"bytes,8,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"`
	ClientId        string              `protobuf:"bytes,9,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	OwnerTenantUuid string              `protobuf:"bytes,10,opt,name=owner_tenant_uuid,json=ownerTenantUuid,proto3" json:"owner_tenant_uuid,omitempty"` // API client owner tenant UUID.
	Scope           []*AccessTokenScope `protobuf:"bytes,11,rep,name=scope,proto3" json:"scope,omitempty"`
	// contains filtered or unexported fields
}

func (*IntrospectTokenResponse) Descriptor deprecated

func (*IntrospectTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use IntrospectTokenResponse.ProtoReflect.Descriptor instead.

func (*IntrospectTokenResponse) GetActive

func (x *IntrospectTokenResponse) GetActive() bool

func (*IntrospectTokenResponse) GetAud

func (x *IntrospectTokenResponse) GetAud() []string

func (*IntrospectTokenResponse) GetClientId

func (x *IntrospectTokenResponse) GetClientId() string

func (*IntrospectTokenResponse) GetExp

func (x *IntrospectTokenResponse) GetExp() int64

func (*IntrospectTokenResponse) GetIss

func (x *IntrospectTokenResponse) GetIss() string

func (*IntrospectTokenResponse) GetJti

func (x *IntrospectTokenResponse) GetJti() string

func (*IntrospectTokenResponse) GetOwnerTenantUuid

func (x *IntrospectTokenResponse) GetOwnerTenantUuid() string

func (*IntrospectTokenResponse) GetScope

func (x *IntrospectTokenResponse) GetScope() []*AccessTokenScope

func (*IntrospectTokenResponse) GetSub

func (x *IntrospectTokenResponse) GetSub() string

func (*IntrospectTokenResponse) GetSubType

func (x *IntrospectTokenResponse) GetSubType() string

func (*IntrospectTokenResponse) GetTokenType

func (x *IntrospectTokenResponse) GetTokenType() string

func (*IntrospectTokenResponse) ProtoMessage

func (*IntrospectTokenResponse) ProtoMessage()

func (*IntrospectTokenResponse) ProtoReflect

func (x *IntrospectTokenResponse) ProtoReflect() protoreflect.Message

func (*IntrospectTokenResponse) Reset

func (x *IntrospectTokenResponse) Reset()

func (*IntrospectTokenResponse) String

func (x *IntrospectTokenResponse) String() string

type IntrospectionScopeFilter

type IntrospectionScopeFilter struct {
	ResourceNamespace string `protobuf:"bytes,1,opt,name=ResourceNamespace,proto3" json:"ResourceNamespace,omitempty"`
	// contains filtered or unexported fields
}

func (*IntrospectionScopeFilter) Descriptor deprecated

func (*IntrospectionScopeFilter) Descriptor() ([]byte, []int)

Deprecated: Use IntrospectionScopeFilter.ProtoReflect.Descriptor instead.

func (*IntrospectionScopeFilter) GetResourceNamespace

func (x *IntrospectionScopeFilter) GetResourceNamespace() string

func (*IntrospectionScopeFilter) ProtoMessage

func (*IntrospectionScopeFilter) ProtoMessage()

func (*IntrospectionScopeFilter) ProtoReflect

func (x *IntrospectionScopeFilter) ProtoReflect() protoreflect.Message

func (*IntrospectionScopeFilter) Reset

func (x *IntrospectionScopeFilter) Reset()

func (*IntrospectionScopeFilter) String

func (x *IntrospectionScopeFilter) String() string

type UnimplementedIDPTokenServiceServer

type UnimplementedIDPTokenServiceServer struct {
}

UnimplementedIDPTokenServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedIDPTokenServiceServer) CreateToken

func (UnimplementedIDPTokenServiceServer) IntrospectToken

type UnsafeIDPTokenServiceServer

type UnsafeIDPTokenServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeIDPTokenServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IDPTokenServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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