Project: ORY Hydra (Provisioning / Key Management)
File: OidcApi.md

All URIs are relative to http://localhost Method | HTTP request | Description | - | - | Post /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration | Post /credentials | Issues a Verifiable Credential | Delete /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol | Get /.well-known/openid-configuration | OpenID Connect Discovery | Get /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration | Get /userinfo | OpenID Connect Userinfo | Get /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout | Put /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration OAuth2Client CreateOidcDynamicClient(ctx).OAuth2Client(oAuth2Client).Execute() Register OAuth2 Client using OpenID Dynamic Client Registration ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | Dynamic Client Registration Request Body configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.OidcApi.CreateOidcDynamicClient(context.Background()).OAuth2Client(oAuth2Client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.CreateOidcDynamicClient``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateOidcDynamicClient`: OAuth2Client fmt.Fprintf(os.Stdout, "Response from `OidcApi.CreateOidcDynamicClient`: %v\n", resp) } ``` Other parameters are passed through a pointer to a apiCreateOidcDynamicClientRequest struct via the builder pattern Name | Type | Description | Notes | - | - | - oAuth2Client | | Dynamic Client Registration Request Body | No authorization required Content-Type: application/json Accept: application/json VerifiableCredentialResponse CreateVerifiableCredential(ctx).CreateVerifiableCredentialRequestBody(createVerifiableCredentialRequestBody).Execute() Issues a Verifiable Credential ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { createVerifiableCredentialRequestBody := *openapiclient.NewCreateVerifiableCredentialRequestBody() // CreateVerifiableCredentialRequestBody | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.OidcApi.CreateVerifiableCredential(context.Background()).CreateVerifiableCredentialRequestBody(createVerifiableCredentialRequestBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.CreateVerifiableCredential``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateVerifiableCredential`: VerifiableCredentialResponse fmt.Fprintf(os.Stdout, "Response from `OidcApi.CreateVerifiableCredential`: %v\n", resp) } ``` Other parameters are passed through a pointer to a apiCreateVerifiableCredentialRequest struct via the builder pattern Name | Type | Description | Notes | - | - | - createVerifiableCredentialRequestBody | | | No authorization required Content-Type: application/json Accept: application/json DeleteOidcDynamicClient(ctx, id).Execute() Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { id := "id_example" // string | The id of the OAuth 2.0 Client. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) r, err := apiClient.OidcApi.DeleteOidcDynamicClient(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.DeleteOidcDynamicClient``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` Name | Type | Description | Notes | - | - | - ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. id | string | The id of the OAuth 2.0 Client. | Other parameters are passed through a pointer to a apiDeleteOidcDynamicClientRequest struct via the builder pattern Name | Type | Description | Notes | - | - | - (empty response body) Content-Type: Not defined Accept: application/json OidcConfiguration DiscoverOidcConfiguration(ctx).Execute() OpenID Connect Discovery ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.OidcApi.DiscoverOidcConfiguration(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.DiscoverOidcConfiguration``: %v\n", err)

"Full HTTP response: %v\n", r) } // response from `DiscoverOidcConfiguration`: OidcConfiguration fmt.Fprintf(os.Stdout, "Response from `OidcApi.DiscoverOidcConfiguration`: %v\n", resp) } ``` This endpoint does not need any parameter. Other parameters are passed through a pointer to a apiDiscoverOidcConfigurationRequest struct via the builder pattern No authorization required Content-Type: Not defined Accept: application/json OAuth2Client GetOidcDynamicClient(ctx, id).Execute() Get OAuth2 Client using OpenID Dynamic Client Registration ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { id := "id_example" // string | The id of the OAuth 2.0 Client. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.OidcApi.GetOidcDynamicClient(context.Background(), id).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.GetOidcDynamicClient``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetOidcDynamicClient`: OAuth2Client fmt.Fprintf(os.Stdout, "Response from `OidcApi.GetOidcDynamicClient`: %v\n", resp) } ``` Name | Type | Description | Notes | - | - | - ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. id | string | The id of the OAuth 2.0 Client. | Other parameters are passed through a pointer to a apiGetOidcDynamicClientRequest struct via the builder pattern Name | Type | Description | Notes | - | - | - Content-Type: Not defined Accept: application/json OidcUserInfo GetOidcUserInfo(ctx).Execute() OpenID Connect Userinfo ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.OidcApi.GetOidcUserInfo(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.GetOidcUserInfo``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetOidcUserInfo`: OidcUserInfo fmt.Fprintf(os.Stdout, "Response from `OidcApi.GetOidcUserInfo`: %v\n", resp) } ``` This endpoint does not need any parameter. Other parameters are passed through a pointer to a apiGetOidcUserInfoRequest struct via the builder pattern Content-Type: Not defined Accept: application/json RevokeOidcSession(ctx).Execute() OpenID Connect Front- and Back-channel Enabled Logout ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) r, err := apiClient.OidcApi.RevokeOidcSession(context.Background()).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.RevokeOidcSession``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } ``` This endpoint does not need any parameter. Other parameters are passed through a pointer to a apiRevokeOidcSessionRequest struct via the builder pattern (empty response body) No authorization required Content-Type: Not defined Accept: Not defined OAuth2Client SetOidcDynamicClient(ctx, id).OAuth2Client(oAuth2Client).Execute() Set OAuth2 Client using OpenID Dynamic Client Registration ```go package main import ( "context" "fmt" "os" openapiclient "github.com/ory/hydra-client-go/v2" ) func main() { id := "id_example" // string | OAuth 2.0 Client ID oAuth2Client := *openapiclient.NewOAuth2Client() // OAuth2Client | OAuth 2.0 Client Request Body configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) resp, r, err := apiClient.OidcApi.SetOidcDynamicClient(context.Background(), id).OAuth2Client(oAuth2Client).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `OidcApi.SetOidcDynamicClient``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SetOidcDynamicClient`: OAuth2Client fmt.Fprintf(os.Stdout, "Response from `OidcApi.SetOidcDynamicClient`: %v\n", resp) } ``` Name | Type | Description | Notes | - | - | - ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. id | string | OAuth 2.0 Client ID | Other parameters are passed through a pointer to a apiSetOidcDynamicClientRequest struct via the builder pattern Name | Type | Description | Notes | - | - | - oAuth2Client | | OAuth 2.0 Client Request Body | Content-Type: application/json Accept: application/json