authzunsafev1alphaconnect

package
v0.0.0-...-9fa10a5 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SignaturesServiceSignClaimsProcedure is the fully-qualified name of the SignaturesService's
	// SignClaims RPC.
	SignaturesServiceSignClaimsProcedure = "/blocky.authz.unsafe.v1alpha.SignaturesService/SignClaims"
	// SignaturesServiceIntrospectSignatureProcedure is the fully-qualified name of the
	// SignaturesService's IntrospectSignature RPC.
	SignaturesServiceIntrospectSignatureProcedure = "/blocky.authz.unsafe.v1alpha.SignaturesService/IntrospectSignature"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// TokensServiceIssueIDTokenProcedure is the fully-qualified name of the TokensService's
	// IssueIDToken RPC.
	TokensServiceIssueIDTokenProcedure = "/blocky.authz.unsafe.v1alpha.TokensService/IssueIDToken"
	// TokensServiceIssueTokenProcedure is the fully-qualified name of the TokensService's IssueToken
	// RPC.
	TokensServiceIssueTokenProcedure = "/blocky.authz.unsafe.v1alpha.TokensService/IssueToken"
	// TokensServiceRefreshTokenProcedure is the fully-qualified name of the TokensService's
	// RefreshToken RPC.
	TokensServiceRefreshTokenProcedure = "/blocky.authz.unsafe.v1alpha.TokensService/RefreshToken"
	// TokensServiceRevokeRefreshTokenProcedure is the fully-qualified name of the TokensService's
	// RevokeRefreshToken RPC.
	TokensServiceRevokeRefreshTokenProcedure = "/blocky.authz.unsafe.v1alpha.TokensService/RevokeRefreshToken"
	// TokensServiceIntrospectTokenProcedure is the fully-qualified name of the TokensService's
	// IntrospectToken RPC.
	TokensServiceIntrospectTokenProcedure = "/blocky.authz.unsafe.v1alpha.TokensService/IntrospectToken"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// ClientServiceName is the fully-qualified name of the ClientService service.
	ClientServiceName = "blocky.authz.unsafe.v1alpha.ClientService"
)
View Source
const (
	// ClientServiceShowClientCredentialsProcedure is the fully-qualified name of the ClientService's
	// ShowClientCredentials RPC.
	ClientServiceShowClientCredentialsProcedure = "/blocky.authz.unsafe.v1alpha.ClientService/ShowClientCredentials"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// SignaturesServiceName is the fully-qualified name of the SignaturesService service.
	SignaturesServiceName = "blocky.authz.unsafe.v1alpha.SignaturesService"
)
View Source
const (
	// TokensServiceName is the fully-qualified name of the TokensService service.
	TokensServiceName = "blocky.authz.unsafe.v1alpha.TokensService"
)

Variables

This section is empty.

Functions

func NewClientServiceHandler

func NewClientServiceHandler(svc ClientServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewClientServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewSignaturesServiceHandler

func NewSignaturesServiceHandler(svc SignaturesServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewSignaturesServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewTokensServiceHandler

func NewTokensServiceHandler(svc TokensServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewTokensServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type ClientServiceClient

type ClientServiceClient interface {
	// ShowClientCredentials shows the client credentials for a client.
	// It may be used by the unsafe client to obtain the client credentials.
	ShowClientCredentials(context.Context, *connect_go.Request[v1alpha.ShowClientCredentialsRequest]) (*connect_go.Response[v1alpha.ClientCredentials], error)
}

ClientServiceClient is a client for the blocky.authz.unsafe.v1alpha.ClientService service.

func NewClientServiceClient

func NewClientServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ClientServiceClient

NewClientServiceClient constructs a client for the blocky.authz.unsafe.v1alpha.ClientService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type ClientServiceHandler

type ClientServiceHandler interface {
	// ShowClientCredentials shows the client credentials for a client.
	// It may be used by the unsafe client to obtain the client credentials.
	ShowClientCredentials(context.Context, *connect_go.Request[v1alpha.ShowClientCredentialsRequest]) (*connect_go.Response[v1alpha.ClientCredentials], error)
}

ClientServiceHandler is an implementation of the blocky.authz.unsafe.v1alpha.ClientService service.

type SignaturesServiceClient

type SignaturesServiceClient interface {
	// Signs the input payload and returns a signed string token.
	// The result is a Json Web Signature (JWS) as defined in RFC 7515.
	SignClaims(context.Context, *connect_go.Request[v1alpha.SignClaimsRequest]) (*connect_go.Response[v1alpha.SignClaimsResponse], error)
	// Introspects the signature and returns the claims.
	// Once the signature is verified, the claims are returned as a Struct.
	IntrospectSignature(context.Context, *connect_go.Request[v1alpha.IntrospectSignatureRequest]) (*connect_go.Response[v1alpha.IntrospectSignatureResponse], error)
}

SignaturesServiceClient is a client for the blocky.authz.unsafe.v1alpha.SignaturesService service.

func NewSignaturesServiceClient

func NewSignaturesServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) SignaturesServiceClient

NewSignaturesServiceClient constructs a client for the blocky.authz.unsafe.v1alpha.SignaturesService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type SignaturesServiceHandler

type SignaturesServiceHandler interface {
	// Signs the input payload and returns a signed string token.
	// The result is a Json Web Signature (JWS) as defined in RFC 7515.
	SignClaims(context.Context, *connect_go.Request[v1alpha.SignClaimsRequest]) (*connect_go.Response[v1alpha.SignClaimsResponse], error)
	// Introspects the signature and returns the claims.
	// Once the signature is verified, the claims are returned as a Struct.
	IntrospectSignature(context.Context, *connect_go.Request[v1alpha.IntrospectSignatureRequest]) (*connect_go.Response[v1alpha.IntrospectSignatureResponse], error)
}

SignaturesServiceHandler is an implementation of the blocky.authz.unsafe.v1alpha.SignaturesService service.

type TokensServiceClient

type TokensServiceClient interface {
	// IssueIDToken issues a new ID token for the input subject.
	IssueIDToken(context.Context, *connect_go.Request[v1alpha.IssueIDTokenRequest]) (*connect_go.Response[v1alpha.IssueIDTokenResponse], error)
	// Issues a new authorization token for the input subject.
	IssueToken(context.Context, *connect_go.Request[v1alpha.IssueTokenRequest]) (*connect_go.Response[v1alpha.IssueTokenResponse], error)
	// Creates a new access, refresh token pair on top of the input refresh token.
	// The input refresh token needs to be non-expired, non-revoked and active.
	// Resulting tokens will share the claims provided during the [IssueTokenRequest].
	RefreshToken(context.Context, *connect_go.Request[v1alpha.RefreshTokenRequest]) (*connect_go.Response[v1alpha.RefreshTokenResponse], error)
	// Revokes the input refresh token.
	// Revoked refresh tokens will not be able to be used to issue new tokens.
	// This makes the refresh token invalid.
	RevokeRefreshToken(context.Context, *connect_go.Request[v1alpha.RevokeRefreshTokenRequest]) (*connect_go.Response[emptypb.Empty], error)
	// Checks if the input token is valid, and if so, returns the claims of the token.
	// If the token is invalid, the response will contain an error.
	IntrospectToken(context.Context, *connect_go.Request[v1alpha.IntrospectTokenRequest]) (*connect_go.Response[v1alpha.IntrospectTokenResponse], error)
}

TokensServiceClient is a client for the blocky.authz.unsafe.v1alpha.TokensService service.

func NewTokensServiceClient

func NewTokensServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) TokensServiceClient

NewTokensServiceClient constructs a client for the blocky.authz.unsafe.v1alpha.TokensService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type TokensServiceHandler

type TokensServiceHandler interface {
	// IssueIDToken issues a new ID token for the input subject.
	IssueIDToken(context.Context, *connect_go.Request[v1alpha.IssueIDTokenRequest]) (*connect_go.Response[v1alpha.IssueIDTokenResponse], error)
	// Issues a new authorization token for the input subject.
	IssueToken(context.Context, *connect_go.Request[v1alpha.IssueTokenRequest]) (*connect_go.Response[v1alpha.IssueTokenResponse], error)
	// Creates a new access, refresh token pair on top of the input refresh token.
	// The input refresh token needs to be non-expired, non-revoked and active.
	// Resulting tokens will share the claims provided during the [IssueTokenRequest].
	RefreshToken(context.Context, *connect_go.Request[v1alpha.RefreshTokenRequest]) (*connect_go.Response[v1alpha.RefreshTokenResponse], error)
	// Revokes the input refresh token.
	// Revoked refresh tokens will not be able to be used to issue new tokens.
	// This makes the refresh token invalid.
	RevokeRefreshToken(context.Context, *connect_go.Request[v1alpha.RevokeRefreshTokenRequest]) (*connect_go.Response[emptypb.Empty], error)
	// Checks if the input token is valid, and if so, returns the claims of the token.
	// If the token is invalid, the response will contain an error.
	IntrospectToken(context.Context, *connect_go.Request[v1alpha.IntrospectTokenRequest]) (*connect_go.Response[v1alpha.IntrospectTokenResponse], error)
}

TokensServiceHandler is an implementation of the blocky.authz.unsafe.v1alpha.TokensService service.

type UnimplementedClientServiceHandler

type UnimplementedClientServiceHandler struct{}

UnimplementedClientServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedSignaturesServiceHandler

type UnimplementedSignaturesServiceHandler struct{}

UnimplementedSignaturesServiceHandler returns CodeUnimplemented from all methods.

type UnimplementedTokensServiceHandler

type UnimplementedTokensServiceHandler struct{}

UnimplementedTokensServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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