language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=DELETE-without_incorrect_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=DELETE-with_a_different_client_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=GET-without_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=GET-without_incorrect_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=GET-with_a_different_client_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=PUT-without_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=PUT-without_incorrect_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-case=selfservice_with_incorrect_or_missing_auth-endpoint=selfservice-method=PUT-with_a_different_client_auth.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=0-description=basic_dynamic_client_registration.json
{ "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client_uri": "", "logo_uri": "", "contac...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_admin_registration.json
{ "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=1-description=basic_dynamic_client_registration.json
{ "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own OAuth2 Client secret." }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=10-description=empty_ID_succeeds.json
{ "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=2-description=empty_ID_succeeds.json
{ "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=2-description=metadata_fails_for_dynamic_client_registration.json
{ "error": "invalid_client_metadata", "error_description": "The value of one of the Client Metadata fields is invalid and the server has rejected this request. Note that an Authorization Server MAY choose to substitute a valid value for any requested parameter of a Client's Metadata. 'metadata' cannot be set for dy...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=3-description=short_secret_fails_for_admin.json
{ "error": "invalid_client_metadata", "error_description": "The value of one of the Client Metadata fields is invalid and the server has rejected this request. Note that an Authorization Server MAY choose to substitute a valid value for any requested parameter of a Client's Metadata. Field client_secret must contai...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=4-description=non-uuid_fails.json
{ "error": "The request was malformed or contained invalid parameters", "error_description": "It is no longer possible to set an OAuth2 Client ID as a user. The system will generate a unique ID for you." }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=5-description=setting_client_id_fails.json
{ "error": "The request was malformed or contained invalid parameters", "error_description": "It is no longer possible to set an OAuth2 Client ID as a user. The system will generate a unique ID for you." }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=6-description=setting_access_token_strategy_fails.json
{ "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own access token strategy." }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=6-description=setting_skip_consent_fails_for_dynamic_registration.json
{ "error": "invalid_request", "error_description": "'skip_consent' cannot be set for dynamic client registration" }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=7-description=basic_dynamic_client_registration.json
{ "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own OAuth2 Client secret." }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=7-description=setting_skip_consent_fails_for_dynamic_registration.json
{ "error": "invalid_request", "error_description": "'skip_consent' cannot be set for dynamic client registration" }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=7-description=setting_skip_consent_suceeds_for_admin_registration.json
{ "client_name": "", "client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": ""...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=basic_dynamic_client_registration.json
{ "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own OAuth2 Client secret." }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=empty_ID_succeeds.json
{ "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=8-description=setting_skip_consent_suceeds_for_admin_registration.json
{ "client_name": "", "client_secret": "2SKZkBf2P5g4toAXXnCrr~_sDM", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": ""...
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=9-description=basic_dynamic_client_registration.json
{ "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own OAuth2 Client secret." }
JSON
hydra/client/.snapshots/TestHandler-common-case=create_clients-case=9-description=empty_ID_succeeds.json
{ "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client...
JSON
hydra/client/.snapshots/TestHandler-common-case=creating_a_client_dynamically_does_not_allow_setting_the_secret.json
{ "body": { "error": "The request was malformed or contained invalid parameters", "error_description": "It is not allowed to choose your own OAuth2 Client secret." }, "status": 400 }
JSON
hydra/client/.snapshots/TestHandler-common-case=delete_non-existing_client-path=-clients-foo.json
{ "body": { "error": "Unable to locate the resource", "error_description": "" }, "status": 404 }
JSON
hydra/client/.snapshots/TestHandler-common-case=delete_non-existing_client-path=-oauth2-register-foo.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=admin.json
{ "body": { "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": [], "response_types": [], "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client_uri...
JSON
hydra/client/.snapshots/TestHandler-common-case=fetching_existing_client-endpoint=selfservice.json
{ "body": { "client_name": "", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": [], "response_types": [], "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client_uri...
JSON
hydra/client/.snapshots/TestHandler-common-case=fetching_non-existing_client-path=-clients-foo.json
{ "body": { "error": "Unable to locate the resource", "error_description": "" }, "status": 404 }
JSON
hydra/client/.snapshots/TestHandler-common-case=fetching_non-existing_client-path=-oauth2-register-foo.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-common-case=patching_non-existing_client.json
{ "body": { "error": "Unable to locate the resource", "error_description": "" }, "status": 404 }
JSON
hydra/client/.snapshots/TestHandler-common-case=update_the_lifespans_of_an_OAuth2_client.json
{ "body": { "client_name": "update-existing-client-lifespans", "redirect_uris": [ "http://localhost:3000/cb" ], "grant_types": [], "response_types": [], "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], ...
JSON
hydra/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=admin.json
{ "body": { "client_name": "", "client_secret": "averylongsecret", "redirect_uris": [ "http://localhost:3000/cb", "https://foobar.com" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri"...
JSON
hydra/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration.json
{ "body": { "client_name": "", "redirect_uris": [ "http://localhost:3000/cb", "https://foobar.com" ], "grant_types": null, "response_types": null, "scope": "offline_access offline openid", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], ...
JSON
hydra/client/.snapshots/TestHandler-common-case=updating_existing_client-endpoint=dynamic_client_registration_does_not_allow_changing_the_secret.json
{ "body": { "error": "The requested action was forbidden", "error_description": "It is not allowed to choose your own OAuth2 Client secret." }, "status": 403 }
JSON
hydra/client/.snapshots/TestHandler-common-case=updating_existing_client_fails_with_metadata_on_self_service.json
{ "body": { "error": "invalid_client_metadata", "error_description": "The value of one of the Client Metadata fields is invalid and the server has rejected this request. Note that an Authorization Server MAY choose to substitute a valid value for any requested parameter of a Client's Metadata. 'metadata' cann...
JSON
hydra/client/.snapshots/TestHandler-common-case=updating_non-existing_client-path=-clients-foo.json
{ "body": { "error": "Unable to locate the resource", "error_description": "" }, "status": 404 }
JSON
hydra/client/.snapshots/TestHandler-common-case=updating_non-existing_client-path=-oauth2-register-foo.json
{ "body": { "error": "The request could not be authorized", "error_description": "The requested OAuth 2.0 client does not exist or you provided incorrect credentials." }, "status": 401 }
JSON
hydra/client/.snapshots/TestHandler-create_client_registration_tokens-case=0-dynamic=true.json
{ "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, "scope": "", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client_uri": "", "logo_uri": "", "contacts": null, "client_secret_expires_at": 0, "subject_type":...
JSON
hydra/client/.snapshots/TestHandler-create_client_registration_tokens-case=1-dynamic=false.json
{ "client_name": "", "redirect_uris": null, "grant_types": null, "response_types": null, "scope": "", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client_uri": "", "logo_uri": "", "contacts": null, "client_secret_expires_at": 0, "subject_type":...
JSON
hydra/client/.snapshots/TestHandler-create_client_registration_tokens-case=2-dynamic=false.json
{ "client_name": "", "client_secret": "01bbf13a-ae3e-44d5-b4b4-dd78137041be", "redirect_uris": null, "grant_types": null, "response_types": null, "scope": "", "audience": [], "owner": "", "policy_uri": "", "allowed_cors_origins": [], "tos_uri": "", "client_uri": "", "logo_uri": "", "contacts...
Go
hydra/cmd/cmd_create_client.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" "github.com/ory/x/flagx" "github.com/ory/x/pointerx" "github.com/ory/hydra/v2/cmd/cli" ) const ( flagClientAllowedCORSOri...
Go
hydra/cmd/cmd_create_client_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "encoding/json" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" "github.com/ory/x/sn...
Go
hydra/cmd/cmd_create_jwks.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "context" "github.com/spf13/cobra" hydra "github.com/ory/hydra-client-go/v2" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" "github.com/ory/x/flagx" ) func NewCreateJWKSCmd() *cobra.Command { const alg...
Go
hydra/cmd/cmd_create_jwks_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "testing" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" ) func Test...
Go
hydra/cmd/cmd_delete.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewDeleteCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "delete", Short: "Delete resources", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFlags()) cmdx...
Go
hydra/cmd/cmd_delete_client.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" ) func NewDeleteClientCmd() *cobra.Command { return &cobra.Command{ Use: "oauth2-client <id-1> [<id-2> ...]", Aliases: []stri...
Go
hydra/cmd/cmd_delete_client_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "encoding/json" "fmt" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/assertx" "github.com/ory/x/cmdx" "g...
Go
hydra/cmd/cmd_delete_jwks.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "context" "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" ) func NewDeleteJWKSCommand() *cobra.Command { return &cobra.Command{ Use: "jwk <id-1> [<id-2> ...]", Aliases: []...
Go
hydra/cmd/cmd_delete_jwks_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "encoding/json" "fmt" "strings" "testing" "github.com/gofrs/uuid" "github.com/ory/hydra/v2/x" "github.com/stretchr/testify/assert" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/assertx" "github.co...
Go
hydra/cmd/cmd_delete_tokens.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" ) func NewDeleteAccessTokensCmd() *cobra.Command { cmd := &cobra.Command{ Use: "access-tokens <client-id>", Args: cobra.Ex...
Go
hydra/cmd/cmd_delete_tokens_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "fmt" "strings" "testing" "github.com/stretchr/testify/assert" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" ) func TestDeleteAccessTokensCmd(t *testing.T) { c := cmd.NewDeleteAccessTokensCmd() reg := se...
Go
hydra/cmd/cmd_get.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewGetCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "get", Short: "Get resources", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFlags()) cmdx.Register...
Go
hydra/cmd/cmd_get_client.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" hydra "github.com/ory/hydra-client-go/v2" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" ) func NewGetClientsCmd() *cobra.Command { return &cobra.Command{ Use: "oauth2-clien...
Go
hydra/cmd/cmd_get_client_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "encoding/json" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" "github.com/ory/x/sn...
Go
hydra/cmd/cmd_get_jwks.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" ) func NewGetJWKSCmd() *cobra.Command { return &cobra.Command{ Use: "jwk set-1 [set-2] ...", Aliases: []string{"jwks"}, Arg...
Go
hydra/cmd/cmd_get_jwks_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "testing" "github.com/gofrs/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" ) func Test...
Go
hydra/cmd/cmd_helper_client.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "encoding/json" "strings" "github.com/spf13/cobra" "github.com/spf13/pflag" hydra "github.com/ory/hydra-client-go/v2" "github.com/ory/hydra/v2/cmd/cli" "github.com/ory/x/flagx" "github.com/ory/x/pointerx" ) func clien...
Go
hydra/cmd/cmd_helper_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "encoding/base64" "net/http/httptest" "os" "testing" "github.com/gofrs/uuid" "github.com/go-jose/go-jose/v3" "github.com/spf13/cobra" "github.com/stretchr/testify/require" "github.com/ory/hydra/v2/cl...
Go
hydra/cmd/cmd_import.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewImportCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "import", Short: "Import resources", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFlags()) cmdx...
Go
hydra/cmd/cmd_import_client.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "bytes" "encoding/json" "errors" "fmt" "io" "os" "github.com/spf13/cobra" hydra "github.com/ory/hydra-client-go/v2" "github.com/ory/hydra/v2/cmd/cli" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" ...
Go
hydra/cmd/cmd_import_client_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "bytes" "context" "encoding/json" "os" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" hydra "github.com/ory/hydra-client-go/v2" "github.com/ory/hy...
Go
hydra/cmd/cmd_import_jwk.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "bytes" "encoding/json" "fmt" "io" "os" "github.com/gofrs/uuid" "github.com/spf13/cobra" hydra "github.com/ory/hydra-client-go/v2" "github.com/ory/hydra/v2/cmd/cli" "github.com/ory/hydra/v2/cmd/cliclient" "github.co...
Go
hydra/cmd/cmd_import_jwk_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "bytes" "encoding/json" "testing" "github.com/gofrs/uuid" "github.com/stretchr/testify/require" "github.com/ory/x/snapshotx" "github.com/ory/x/stringsx" "github.com/stretchr/testify/assert" "github.com/tidwall/g...
Go
hydra/cmd/cmd_introspect.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewIntrospectCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "introspect", Short: "Introspect resources", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFl...
Go
hydra/cmd/cmd_introspect_token.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "strings" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" "github.com/ory/x/flagx" "github.com/spf13/cobra" ) func NewIntrospectTokenCmd() *cobra.Command { cmd := &cobra.Command{ Use: "token the-to...
Go
hydra/cmd/cmd_introspect_token_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "testing" "golang.org/x/oauth2/clientcredentials" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cm...
Go
hydra/cmd/cmd_list.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewListCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "list", Aliases: []string{"ls"}, Short: "List resources", } cmdx.RegisterHTTPClientFlags(cmd...
Go
hydra/cmd/cmd_list_clients.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" ) func NewListClientsCmd() *cobra.Command { cmd := &cobra.Command{ Use: "oauth2-clients", Aliases: []string{"clients"...
Go
hydra/cmd/cmd_list_clients_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "testing" "github.com/stretchr/testify/require" "github.com/ory/hydra/v2/client" "github.com/stretchr/testify/assert" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" ) func TestL...
Go
hydra/cmd/cmd_perform.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewPerformCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "perform", Short: "Perform OAuth 2.0 Flows", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFlags...
Go
hydra/cmd/cmd_perform_authorization_code.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "context" "crypto/rand" "crypto/rsa" "crypto/tls" "fmt" "html/template" "net/http" "os" "strconv" "strings" "time" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/pkg/errors" "github.com/ory/graceful" "git...
Go
hydra/cmd/cmd_perform_client_credentials.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "context" "fmt" "net/url" "os" "strings" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/spf13/cobra" "golang.org/x/oauth2" "golang.org/x/oauth2/clientcredentials" "github.com/ory/x/cmdx" "github.com/ory/x/flag...
Go
hydra/cmd/cmd_perform_client_credentials_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "testing" "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" ) func TestPerformClientCredentialsGrant(t *tes...
Go
hydra/cmd/cmd_revoke.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewRevokeCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "revoke", Short: "Revoke resources", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFlags()) cmdx...
Go
hydra/cmd/cmd_revoke_token.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "context" "fmt" "os" hydra "github.com/ory/hydra-client-go/v2" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" "github.com/ory/x/flagx" "github.com/spf13/cobra" ) func NewRevokeTokenCmd() *cobra.Comman...
Go
hydra/cmd/cmd_revoke_token_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/oauth2/clientcredentials" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmd...
Go
hydra/cmd/cmd_update.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewUpdateCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "update", Short: "Update resources", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFlags()) cmdx...
Go
hydra/cmd/cmd_update_client.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "context" "fmt" "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cli" "github.com/ory/hydra/v2/cmd/cliclient" "github.com/ory/x/cmdx" "github.com/ory/x/flagx" "github.com/ory/x/pointerx" ) func NewUpdateClientCmd...
Go
hydra/cmd/cmd_update_client_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd_test import ( "context" "encoding/json" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "github.com/ory/hydra/v2/cmd" "github.com/ory/x/cmdx" "github.com/ory/x/sn...
Go
hydra/cmd/create.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/cmdx" ) func NewCreateCmd() *cobra.Command { var cmd = &cobra.Command{ Use: "create", Short: "Create resources", } cmdx.RegisterHTTPClientFlags(cmd.PersistentFlags()) cmdx...
Go
hydra/cmd/helper.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" "net/http" "net/url" "os" "github.com/tomnomnom/linkheader" ) var osExit = os.Exit func fatal(message string, args ...interface{}) { fmt.Printf(message+"\n", args...) osExit(1) } func getPageToken(resp *http.Res...
Go
hydra/cmd/helper_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "net/http/httptest" "net/url" "testing" "github.com/stretchr/testify/assert" "github.com/ory/x/pagination/tokenpagination" ) func TestFatal(t *testing.T) { oldOsExit := osExit defer func() { osExit = oldOsExit }() va...
Go
hydra/cmd/janitor.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/hydra/v2/driver" "github.com/ory/x/servicelocatorx" "github.com/ory/hydra/v2/cmd/cli" "github.com/ory/x/configx" ) func NewJanitorCmd(slOpts []servicelocatorx.Option, dOpts []driv...
Go
hydra/cmd/migrate.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/configx" ) func NewMigrateCmd() *cobra.Command { cmd := &cobra.Command{ Use: "migrate", Short: "Various migration helpers", } configx.RegisterFlags(cmd.PersistentFlags()) ...
Go
hydra/cmd/migrate_gen.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cli" ) func NewMigrateGenCmd() *cobra.Command { cmd := &cobra.Command{ Use: "gen </source/path> </target/path>", Short: "Generate migration files from migration te...
Go
hydra/cmd/migrate_sql.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/hydra/v2/driver" "github.com/ory/x/configx" "github.com/ory/x/servicelocatorx" "github.com/ory/hydra/v2/cmd/cli" ) func NewMigrateSqlCmd(slOpts []servicelocatorx.Option, dOpts []d...
Go
hydra/cmd/migrate_status.go
// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/ory/x/cmdx" "github.com/ory/x/configx" "github.com/ory/x/servicelocatorx" "github.com/spf13/cobra" "github.com/ory/hydra/v2/cmd/cli" "github.com/ory/hydra/v2/driver" ) func NewMigrateStatusCmd(slOpts []servi...
Go
hydra/cmd/output_client.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" "strings" "github.com/ory/x/pointerx" hydra "github.com/ory/hydra-client-go/v2" ) type ( outputOAuth2Client hydra.OAuth2Client outputOAuth2ClientCollection struct { clients []hydra.OAuth2Client } ) f...
Go
hydra/cmd/output_introspection.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" "time" "github.com/ory/x/pointerx" hydra "github.com/ory/hydra-client-go/v2" ) type ( outputOAuth2TokenIntrospection hydra.IntrospectedOAuth2Token ) func (outputOAuth2TokenIntrospection) Header() []string { retur...
Go
hydra/cmd/output_jwks.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" hydra "github.com/ory/hydra-client-go/v2" ) type ( outputJsonWebKey struct { Set string `json:"set"` hydra.JsonWebKey } outputJSONWebKeyCollection struct { Set string `json:"set"` Keys []hydra.J...
Go
hydra/cmd/output_token.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" "time" "github.com/ory/x/stringsx" "golang.org/x/oauth2" ) type ( outputOAuth2Token oauth2.Token ) func (outputOAuth2Token) Header() []string { return []string{"ACCESS TOKEN", "REFRESH TOKEN", "ID TOKEN", "EXPIRY...
Go
hydra/cmd/root.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "fmt" "os" "github.com/ory/x/cmdx" "github.com/ory/hydra/v2/driver" "github.com/ory/x/configx" "github.com/ory/x/servicelocatorx" "github.com/spf13/cobra" ) func NewRootCmd(slOpts []servicelocatorx.Option, dOpts []dri...
Go
hydra/cmd/root_test.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "testing" "github.com/ory/x/cmdx" ) func TestUsageStrings(t *testing.T) { cmdx.AssertUsageTemplates(t, NewRootCmd(nil, nil, nil)) }
Go
hydra/cmd/serve.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/x/configx" ) var serveControls = `## Configuration Ory Hydra can be configured using environment variables as well as a configuration file. For more information on configuration opti...
Go
hydra/cmd/serve_admin.go
// Copyright © 2022 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd import ( "github.com/spf13/cobra" "github.com/ory/hydra/v2/driver" "github.com/ory/x/configx" "github.com/ory/x/servicelocatorx" "github.com/ory/hydra/v2/cmd/server" ) // adminCmd represents the admin command func NewServeAdminCm...