Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterIDPTokenServiceServer(s grpc.ServiceRegistrar, srv IDPTokenServiceServer)
- type AccessTokenScope
- func (*AccessTokenScope) Descriptor() ([]byte, []int)deprecated
- func (x *AccessTokenScope) GetResourceNamespace() string
- func (x *AccessTokenScope) GetResourcePath() string
- func (x *AccessTokenScope) GetResourceServer() string
- func (x *AccessTokenScope) GetRoleName() string
- func (x *AccessTokenScope) GetTenantIntId() int64
- func (x *AccessTokenScope) GetTenantUuid() string
- func (*AccessTokenScope) ProtoMessage()
- func (x *AccessTokenScope) ProtoReflect() protoreflect.Message
- func (x *AccessTokenScope) Reset()
- func (x *AccessTokenScope) String() string
- type CreateTokenRequest
- func (*CreateTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenRequest) GetAssertion() string
- func (x *CreateTokenRequest) GetGrantType() string
- func (x *CreateTokenRequest) GetNotRequiredIntrospection() bool
- func (*CreateTokenRequest) ProtoMessage()
- func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message
- func (x *CreateTokenRequest) Reset()
- func (x *CreateTokenRequest) String() string
- type CreateTokenResponse
- func (*CreateTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateTokenResponse) GetAccessToken() string
- func (x *CreateTokenResponse) GetExpiresIn() int64
- func (x *CreateTokenResponse) GetTokenType() string
- func (*CreateTokenResponse) ProtoMessage()
- func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message
- func (x *CreateTokenResponse) Reset()
- func (x *CreateTokenResponse) String() string
- type IDPTokenServiceClient
- type IDPTokenServiceServer
- type IntrospectTokenRequest
- func (*IntrospectTokenRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IntrospectTokenRequest) GetScopeFilter() []*IntrospectionScopeFilter
- func (x *IntrospectTokenRequest) GetToken() string
- func (*IntrospectTokenRequest) ProtoMessage()
- func (x *IntrospectTokenRequest) ProtoReflect() protoreflect.Message
- func (x *IntrospectTokenRequest) Reset()
- func (x *IntrospectTokenRequest) String() string
- type IntrospectTokenResponse
- func (*IntrospectTokenResponse) Descriptor() ([]byte, []int)deprecated
- func (x *IntrospectTokenResponse) GetActive() bool
- func (x *IntrospectTokenResponse) GetAud() []string
- func (x *IntrospectTokenResponse) GetCustomClaimsJson() string
- func (x *IntrospectTokenResponse) GetExp() int64
- func (x *IntrospectTokenResponse) GetIat() int64
- func (x *IntrospectTokenResponse) GetIss() string
- func (x *IntrospectTokenResponse) GetJti() string
- func (x *IntrospectTokenResponse) GetNbf() int64
- func (x *IntrospectTokenResponse) GetScope() []*AccessTokenScope
- func (x *IntrospectTokenResponse) GetSub() string
- func (x *IntrospectTokenResponse) GetTokenType() string
- func (*IntrospectTokenResponse) ProtoMessage()
- func (x *IntrospectTokenResponse) ProtoReflect() protoreflect.Message
- func (x *IntrospectTokenResponse) Reset()
- func (x *IntrospectTokenResponse) String() string
- type IntrospectionScopeFilter
- func (*IntrospectionScopeFilter) Descriptor() ([]byte, []int)deprecated
- func (x *IntrospectionScopeFilter) GetResourceNamespace() string
- func (*IntrospectionScopeFilter) ProtoMessage()
- func (x *IntrospectionScopeFilter) ProtoReflect() protoreflect.Message
- func (x *IntrospectionScopeFilter) Reset()
- func (x *IntrospectionScopeFilter) String() string
- type UnimplementedIDPTokenServiceServer
- type UnsafeIDPTokenServiceServer
Constants ¶
const ( IDPTokenService_CreateToken_FullMethodName = "/idp_token.IDPTokenService/CreateToken" IDPTokenService_IntrospectToken_FullMethodName = "/idp_token.IDPTokenService/IntrospectToken" )
Variables ¶
var File_idp_token_proto protoreflect.FileDescriptor
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=resource_server,json=resourceServer,proto3" json:"resource_server,omitempty"`
ResourceNamespace string `protobuf:"bytes,4,opt,name=resource_namespace,json=resourceNamespace,proto3" json:"resource_namespace,omitempty"`
ResourcePath string `protobuf:"bytes,5,opt,name=resource_path,json=resourcePath,proto3" json:"resource_path,omitempty"`
RoleName string `protobuf:"bytes,6,opt,name=role_name,json=roleName,proto3" json:"role_name,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"`
NotRequiredIntrospection bool `` /* 136-byte string literal not displayed */
// 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) GetNotRequiredIntrospection ¶ added in v0.15.0
func (x *CreateTokenRequest) GetNotRequiredIntrospection() bool
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.
// Currently only "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
// 1. it's not expired;
// 2. it's not revoked;
// 3. it has a 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.
func NewIDPTokenServiceClient ¶
func NewIDPTokenServiceClient(cc grpc.ClientConnInterface) IDPTokenServiceClient
type IDPTokenServiceServer ¶
type IDPTokenServiceServer interface {
// CreateToken creates a new token based on the provided assertion.
// Currently only "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
// 1. it's not expired;
// 2. it's not revoked;
// 3. it has a 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"`
Scope []*AccessTokenScope `protobuf:"bytes,11,rep,name=scope,proto3" json:"scope,omitempty"`
Nbf int64 `protobuf:"varint,12,opt,name=nbf,proto3" json:"nbf,omitempty"`
Iat int64 `protobuf:"varint,13,opt,name=iat,proto3" json:"iat,omitempty"`
CustomClaimsJson string `protobuf:"bytes,14,opt,name=custom_claims_json,json=customClaimsJson,proto3" json:"custom_claims_json,omitempty"` // JSON string containing custom claims
// 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) GetCustomClaimsJson ¶ added in v0.26.0
func (x *IntrospectTokenResponse) GetCustomClaimsJson() string
func (*IntrospectTokenResponse) GetExp ¶
func (x *IntrospectTokenResponse) GetExp() int64
func (*IntrospectTokenResponse) GetIat ¶ added in v0.10.0
func (x *IntrospectTokenResponse) GetIat() int64
func (*IntrospectTokenResponse) GetIss ¶
func (x *IntrospectTokenResponse) GetIss() string
func (*IntrospectTokenResponse) GetJti ¶
func (x *IntrospectTokenResponse) GetJti() string
func (*IntrospectTokenResponse) GetNbf ¶ added in v0.10.0
func (x *IntrospectTokenResponse) GetNbf() int64
func (*IntrospectTokenResponse) GetScope ¶
func (x *IntrospectTokenResponse) GetScope() []*AccessTokenScope
func (*IntrospectTokenResponse) GetSub ¶
func (x *IntrospectTokenResponse) GetSub() 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=resource_namespace,json=resourceNamespace,proto3" json:"resource_namespace,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) CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
func (UnimplementedIDPTokenServiceServer) IntrospectToken ¶
func (UnimplementedIDPTokenServiceServer) IntrospectToken(context.Context, *IntrospectTokenRequest) (*IntrospectTokenResponse, error)
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.