oidcv1connect

package
v0.0.0-...-bb2e6d5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OIDCPrivateServiceName is the fully-qualified name of the OIDCPrivateService service.
	OIDCPrivateServiceName = "oidc.v1.OIDCPrivateService"
)

Variables

This section is empty.

Functions

func NewOIDCPrivateServiceHandler

func NewOIDCPrivateServiceHandler(svc OIDCPrivateServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewOIDCPrivateServiceHandler 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 OIDCPrivateServiceClient

type OIDCPrivateServiceClient interface {
	// Authenticate authenticates the end user and generates OAuth2.0 Authorization Code
	// Possible error code (defined by OAuth2.0 or OpenID Connect):
	// - InvalidArgument: "invalid_scope"
	// - InvalidArgument: "invalid_request_uri"
	// - InvalidArgument: "unsupported_response_type"
	// - InvalidArgument: "invalid_request"
	// - PermissionDenied: "unauthorized_client"
	// - PermissionDenied: "consent_required"
	// Possible error code (defined by Self):
	// - InvalidArgument: "invalid_client_id"
	// - InvalidArgument: "invalid_redirect_uri"
	Authenticate(context.Context, *connect_go.Request[v1.AuthenticateRequest]) (*connect_go.Response[v1.AuthenticateResponse], error)
	// Exchange exchanges authorization code into access token and ID Token
	// Spec: [OpenID Connect Core 1.0 Section 3.1.3.](http://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#TokenEndpoint)
	// Possible error code (defined by OAuth2.0 or OpenID Connect):
	// - InvalidArgument: "invalid_request"
	// - InvalidArgument: "unsupported_grant_type"
	// - InvalidArgument: "invalid_grant"
	// - Unauthenticated: "invalid_client"
	// Possible error code (defined by Self):
	// - InvalidArgument: "invalid_redirect_uri"
	Exchange(context.Context, *connect_go.Request[v1.ExchangeRequest]) (*connect_go.Response[v1.ExchangeResponse], error)
}

OIDCPrivateServiceClient is a client for the oidc.v1.OIDCPrivateService service.

func NewOIDCPrivateServiceClient

func NewOIDCPrivateServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) OIDCPrivateServiceClient

NewOIDCPrivateServiceClient constructs a client for the oidc.v1.OIDCPrivateService 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 OIDCPrivateServiceHandler

type OIDCPrivateServiceHandler interface {
	// Authenticate authenticates the end user and generates OAuth2.0 Authorization Code
	// Possible error code (defined by OAuth2.0 or OpenID Connect):
	// - InvalidArgument: "invalid_scope"
	// - InvalidArgument: "invalid_request_uri"
	// - InvalidArgument: "unsupported_response_type"
	// - InvalidArgument: "invalid_request"
	// - PermissionDenied: "unauthorized_client"
	// - PermissionDenied: "consent_required"
	// Possible error code (defined by Self):
	// - InvalidArgument: "invalid_client_id"
	// - InvalidArgument: "invalid_redirect_uri"
	Authenticate(context.Context, *connect_go.Request[v1.AuthenticateRequest]) (*connect_go.Response[v1.AuthenticateResponse], error)
	// Exchange exchanges authorization code into access token and ID Token
	// Spec: [OpenID Connect Core 1.0 Section 3.1.3.](http://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#TokenEndpoint)
	// Possible error code (defined by OAuth2.0 or OpenID Connect):
	// - InvalidArgument: "invalid_request"
	// - InvalidArgument: "unsupported_grant_type"
	// - InvalidArgument: "invalid_grant"
	// - Unauthenticated: "invalid_client"
	// Possible error code (defined by Self):
	// - InvalidArgument: "invalid_redirect_uri"
	Exchange(context.Context, *connect_go.Request[v1.ExchangeRequest]) (*connect_go.Response[v1.ExchangeResponse], error)
}

OIDCPrivateServiceHandler is an implementation of the oidc.v1.OIDCPrivateService service.

type UnimplementedOIDCPrivateServiceHandler

type UnimplementedOIDCPrivateServiceHandler struct{}

UnimplementedOIDCPrivateServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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