# Functions
No description provided by the author
GetTestRSAPrivateKey returns pre-defined RSA private key for testing.
MakeTokenString create signed token with claims.
MakeTokenStringSignedWithTestKey create test token signed with the pre-defined private key (TestKeyID) for testing.
MakeTokenStringWithHeader create test signed token with claims and headers.
MustMakeTokenString create signed token with claims.
MustMakeTokenStringSignedWithTestKey create test token signed with the pre-defined private key (TestKeyID) for testing.
MustMakeTokenStringWithHeader create test signed token with claims and headers.
MustSignToken signs token with key.
NewGRPCServer creates a new instance of GRPCServer.
NewHTTPServer creates a new IDPMockServer with provided options.
No description provided by the author
SignToken signs token with key.
WithGRPCAddr is an option to set gRPC server address.
WithGRPCServerOptions is an option to set gRPC server options.
WithGRPCTokenCreator is an option to set token creator for the server.
WithGRPCTokenIntrospector is an option to set token introspector for the server.
WithHTTPAddress is an option to set HTTP server address.
WithHTTPClaimsProvider is an option to set ClaimsProvider for TokenHandler which will be used for POST /idp/token.
WithHTTPEndpointPaths is an option to set custom paths for different IDP endpoints.
WithHTTPIntrospectTokenHandler is an option to set custom handler for POST /idp/introspect_token.
WithHTTPKeysHandler is an option to set custom handler for GET /idp/keys.
No description provided by the author
WithHTTPPublicJWKS is an option to set public JWKS for JWKSHandler which will be used for GET /idp/keys.
WithHTTPTokenHandler is an option to set custom handler for POST /idp/token.
WithHTTPTokenIntrospector is an option to set TokenIntrospector for TokenIntrospectionHandler which will be used for POST /idp/introspect_token.
# Constants
No description provided by the author
No description provided by the author
TestKeyID is a key ID of the pre-defined key for testing.
TestPlainPrivateJWK is a plaintext representation of the pre-defined private key for testing.
No description provided by the author
nolint:gosec // This server is used for testing purposes only.
# Variables
No description provided by the author
# Structs
GRPCServer is a gRPC server for IDP token service.
HTTPPaths contains paths for different IDP endpoints.
HTTPServer is a mock IDP server for testing purposes.
JWKSHandler is an HTTP handler that responds JWKS.
OpenIDConfigurationHandler is an HTTP handler that responds token's issuer OpenID configuration.
OpenIDConfigurationResponse is a response for .well-known/openid-configuration endpoint.
No description provided by the author
No description provided by the author
No description provided by the author
TokenHandler is an implementation of a handler responding with IDP token.
No description provided by the author
TokenResponse is a response for POST /idp/token endpoint.
# Interfaces
GRPCTokenCreator is an interface for creating tokens using gRPC.
GRPCTokenIntrospector is an interface for introspecting tokens using gRPC.
HTTPClaimsProvider is an interface for providing JWT claims for an issuing token request via HTTP.
HTTPTokenIntrospector is an interface for introspecting tokens via HTTP.
# Type aliases
GRPCServerOption is an option for GRPCServer.
GRPCTokenCreatorFunc is a function that implements GRPCTokenCreator interface.
GRPCTokenIntrospectorFunc is a function that implements GRPCTokenIntrospector interface.
HTTPClaimsProviderFunc is a function that implements HTTPClaimsProvider interface.
HTTPServerOption is an option for HTTPServer.
HTTPTokenIntrospectorFunc is a function that implements HTTPTokenIntrospector interface.