Skip to content

Commit

Permalink
fix: automatically append multiStatements parameter to mySQL URI (#1835)
Browse files Browse the repository at this point in the history
Co-authored-by: aeneasr <aeneas@ory.sh>
  • Loading branch information
zepatrik and aeneasr committed Apr 30, 2020
1 parent 668f946 commit 849fe62
Show file tree
Hide file tree
Showing 29 changed files with 104 additions and 56 deletions.
96 changes: 72 additions & 24 deletions .schema/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1831,10 +1831,10 @@
"description": "It is important that this model object is named JSONWebKey for\n\"swagger generate spec\" to generate only on definition of a\nJSONWebKey.",
"type": "object",
"required": [
"use",
"kty",
"alg",
"kid",
"alg"
"kty",
"use"
],
"properties": {
"alg": {
Expand Down Expand Up @@ -1937,7 +1937,7 @@
},
"PluginConfig": {
"type": "object",
"title": "PluginConfig The config of a plugin.",
"title": "PluginConfig PluginConfig PluginConfig The config of a plugin.",
"required": [
"Args",
"Description",
Expand Down Expand Up @@ -2058,7 +2058,7 @@
}
},
"PluginConfigInterface": {
"description": "PluginConfigInterface The interface between Docker and the plugin",
"description": "PluginConfigInterface PluginConfigInterface PluginConfigInterface The interface between Docker and the plugin",
"type": "object",
"required": [
"Socket",
Expand Down Expand Up @@ -2108,7 +2108,7 @@
}
},
"PluginConfigNetwork": {
"description": "PluginConfigNetwork plugin config network",
"description": "PluginConfigNetwork PluginConfigNetwork PluginConfigNetwork plugin config network",
"type": "object",
"required": [
"Type"
Expand Down Expand Up @@ -2154,7 +2154,7 @@
}
},
"PluginDevice": {
"description": "PluginDevice plugin device",
"description": "PluginDevice PluginDevice PluginDevice plugin device",
"type": "object",
"required": [
"Description",
Expand Down Expand Up @@ -2328,20 +2328,30 @@
}
},
"PreviousConsentSession": {
"description": "The response used to return used consent requests\nsame as HandledLoginRequest, just with consent_request exposed as json",
"description": "PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests\nsame as HandledLoginRequest, just with consent_request exposed as json",
"type": "object",
"properties": {
"consent_request": {
"$ref": "#/definitions/consentRequest"
},
"grant_access_token_audience": {
"$ref": "#/definitions/StringSlicePipeDelimiter"
"description": "GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.",
"type": "array",
"items": {
"type": "string"
}
},
"grant_scope": {
"$ref": "#/definitions/StringSlicePipeDelimiter"
"description": "GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`",
"type": "array",
"items": {
"type": "string"
}
},
"handled_at": {
"$ref": "#/definitions/NullTime"
"description": "handled at\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time",
"type": "string",
"format": "date-time"
},
"remember": {
"description": "Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same\nclient asks the same user for the same, or a subset of, scope.",
Expand All @@ -2365,7 +2375,7 @@
}
},
"VolumeUsageData": {
"description": "VolumeUsageData Usage details about the volume. This information is used by the\n`GET /system/df` endpoint, and omitted in other endpoints.",
"description": "VolumeUsageData VolumeUsageData Usage details about the volume. This information is used by the\n`GET /system/df` endpoint, and omitted in other endpoints.",
"type": "object",
"required": [
"RefCount",
Expand All @@ -2386,12 +2396,20 @@
},
"acceptConsentRequest": {
"type": "object",
"title": "The request payload used to accept a consent request.",
"title": "AcceptConsentRequest AcceptConsentRequest The request payload used to accept a consent request.",
"properties": {
"grant_access_token_audience": {
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
},
"grant_scope": {
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
},
"handled_at": {
Expand Down Expand Up @@ -2488,9 +2506,19 @@
"type": "string"
},
"requested_access_token_audience": {
"description": "requested access token audience",
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
},
"requested_scope": {
"description": "requested scope",
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
},
"skip": {
Expand Down Expand Up @@ -2577,6 +2605,7 @@
}
},
"healthStatus": {
"description": "HealthStatus health status",
"type": "object",
"properties": {
"status": {
Expand All @@ -2589,8 +2618,8 @@
"type": "object",
"required": [
"alg",
"use",
"kid"
"kid",
"use"
],
"properties": {
"alg": {
Expand All @@ -2609,7 +2638,7 @@
},
"loginRequest": {
"type": "object",
"title": "Contains information on an ongoing login request.",
"title": "LoginRequest LoginRequest LoginRequest LoginRequest Contains information on an ongoing login request.",
"properties": {
"challenge": {
"description": "Challenge is the identifier (\"login challenge\") of the login request. It is used to\nidentify the session.",
Expand All @@ -2626,9 +2655,17 @@
"type": "string"
},
"requested_access_token_audience": {
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
},
"requested_scope": {
"type": "array",
"items": {
"type": "string"
},
"$ref": "#/definitions/StringSlicePipeDelimiter"
},
"session_id": {
Expand All @@ -2647,7 +2684,7 @@
},
"logoutRequest": {
"type": "object",
"title": "Contains information about an ongoing logout request.",
"title": "LogoutRequest LogoutRequest Contains information about an ongoing logout request.",
"properties": {
"request_url": {
"description": "RequestURL is the original Logout URL requested.",
Expand All @@ -2669,7 +2706,7 @@
},
"oAuth2Client": {
"type": "object",
"title": "Client represents an OAuth 2.0 Client.",
"title": "OAuth2Client OAuth2Client OAuth2Client Client represents an OAuth 2.0 Client.",
"properties": {
"allowed_cors_origins": {
"$ref": "#/definitions/StringSlicePipeDelimiter"
Expand Down Expand Up @@ -2710,7 +2747,7 @@
"$ref": "#/definitions/StringSlicePipeDelimiter"
},
"created_at": {
"description": "CreatedAt returns the timestamp of the client's creation.",
"description": "CreatedAt returns the timestamp of the client's creation.\nFormat: date-time\nFormat: date-time\nFormat: date-time",
"type": "string",
"format": "date-time"
},
Expand Down Expand Up @@ -2785,7 +2822,7 @@
"type": "string"
},
"updated_at": {
"description": "UpdatedAt returns the timestamp of the last update.",
"description": "UpdatedAt returns the timestamp of the last update.\nFormat: date-time\nFormat: date-time\nFormat: date-time",
"type": "string",
"format": "date-time"
},
Expand Down Expand Up @@ -2867,26 +2904,32 @@
}
},
"oauth2TokenResponse": {
"description": "The Access Token Response",
"description": "Oauth2TokenResponse Oauth2TokenResponse The Access Token Response",
"type": "object",
"properties": {
"access_token": {
"description": "access token",
"type": "string"
},
"expires_in": {
"description": "expires in",
"type": "integer",
"format": "int64"
},
"id_token": {
"description": "id token",
"type": "string"
},
"refresh_token": {
"description": "refresh token",
"type": "string"
},
"scope": {
"description": "scope",
"type": "string"
},
"token_type": {
"description": "token type",
"type": "string"
}
}
Expand Down Expand Up @@ -2928,28 +2971,33 @@
},
"rejectRequest": {
"type": "object",
"title": "The request payload used to accept a login or consent request.",
"title": "RejectRequest RejectRequest The request payload used to accept a login or consent request.",
"properties": {
"error": {
"description": "error",
"type": "string"
},
"error_debug": {
"description": "error debug",
"type": "string"
},
"error_description": {
"description": "error description",
"type": "string"
},
"error_hint": {
"description": "error hint",
"type": "string"
},
"status_code": {
"description": "status code",
"type": "integer",
"format": "int64"
}
}
},
"userinfoResponse": {
"description": "The userinfo response",
"description": "UserinfoResponse UserinfoResponse UserinfoResponse UserinfoResponse The userinfo response",
"type": "object",
"properties": {
"birthdate": {
Expand Down Expand Up @@ -3043,7 +3091,7 @@
"wellKnown": {
"description": "It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms\namong others.",
"type": "object",
"title": "WellKnown represents important OpenID Connect discovery metadata",
"title": "WellKnown WellKnown represents important OpenID Connect discovery metadata",
"required": [
"issuer",
"authorization_endpoint",
Expand Down
2 changes: 1 addition & 1 deletion driver/registry_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (m *RegistrySQL) Init() error {
// new db connection
pool, idlePool, connMaxLifetime, cleanedDSN := sqlcon.ParseConnectionOptions(m.l, m.c.DSN())
c, err := pop.NewConnection(&pop.ConnectionDetails{
URL: cleanedDSN,
URL: sqlcon.FinalizeDSN(m.l, cleanedDSN),
IdlePool: idlePool,
ConnMaxLifetime: connMaxLifetime,
Pool: pool,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
github.com/ory/herodot v0.7.0
github.com/ory/sdk/swagutil v0.0.0-20200430101046-db494fac5eb6
github.com/ory/viper v1.7.4
github.com/ory/x v0.0.115
github.com/ory/x v0.0.116
github.com/pborman/uuid v1.2.0
github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5
github.com/pkg/errors v0.9.1
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,6 @@ github.com/ory/herodot v0.7.0 h1:DGPUyPDBZwQSaQzci4UW/edjG6OWixZTwXyfjBgEVgs=
github.com/ory/herodot v0.7.0/go.mod h1:YXKOfAXYdQojDP5sD8m0ajowq3+QXNdtxA+QiUXBwn0=
github.com/ory/jsonschema/v3 v3.0.1 h1:xzV7w2rt/Qn+jvh71joIXNKKOCqqNyTlaIxdxU0IQJc=
github.com/ory/jsonschema/v3 v3.0.1/go.mod h1:jgLHekkFk0uiGdEWGleC+tOm6JSSP8cbf17PnBuGXlw=
github.com/ory/sdk/swagutil v0.0.0-20200423140806-4d849e59dffb h1:eokjOSqbJGUr5cAn9UZYj8cjilFF8E2qRc7GeJpGdlg=
github.com/ory/sdk/swagutil v0.0.0-20200423140806-4d849e59dffb/go.mod h1:Ufg1eAyz+Zt3+oweSZVThG13ewewWCKwBmoNmK8Z0co=
github.com/ory/sdk/swagutil v0.0.0-20200430101046-db494fac5eb6 h1:oKOQcB9DZy7govO5k12s9Ofwm4d4yZiMLmeMZE6QWZY=
github.com/ory/sdk/swagutil v0.0.0-20200430101046-db494fac5eb6/go.mod h1:Ufg1eAyz+Zt3+oweSZVThG13ewewWCKwBmoNmK8Z0co=
github.com/ory/viper v1.5.6 h1:w4ceGgWwWLzAFYQ7bHaDZmwNsAto2JPVdyQjQnn7VWI=
Expand All @@ -911,8 +909,8 @@ github.com/ory/x v0.0.85/go.mod h1:s44V8t3xyjWZREcU+mWlp4h302rTuM4aLXcW+y5FbQ8=
github.com/ory/x v0.0.88/go.mod h1:wrnJRjIfYXFY/AUiuUlcIUpLBDxFtWc+8x6toAeLZXU=
github.com/ory/x v0.0.93/go.mod h1:lfcTaGXpTZs7IEQAW00r9EtTCOxD//SiP5uWtNiz31g=
github.com/ory/x v0.0.110/go.mod h1:DJfkE3GdakhshNhw4zlKoRaL/ozg/lcTahA9OCih2BE=
github.com/ory/x v0.0.115 h1:5uRBZiQN6lmu4D6Rv0a9j4Ki9dxB5oiF9PF9oj+ShWY=
github.com/ory/x v0.0.115/go.mod h1:ImFneVZHXPCeI1EYXLzRylIkOUMQnWT9Xwuasd8QHxw=
github.com/ory/x v0.0.116 h1:gq47UBzFe9l8n4CToLFMAkjNwqTR+oq1JZYxhA0T5dM=
github.com/ory/x v0.0.116/go.mod h1:ImFneVZHXPCeI1EYXLzRylIkOUMQnWT9Xwuasd8QHxw=
github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
Expand Down
2 changes: 1 addition & 1 deletion internal/httpclient/models/accept_consent_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/accept_login_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/consent_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/consent_request_session.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/health_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 849fe62

Please sign in to comment.