Skip to content
Permalink
Browse files

consent: Login revokation is exposed at public not admin (#1333)

Closes #1329

Signed-off-by: aeneasr <aeneas@ory.sh>
  • Loading branch information...
aeneasr committed Apr 2, 2019
1 parent 001a22f commit 7c4b6d4a61191fcfe947acca8b4dbf942fec3b15
Showing with 1,571 additions and 421 deletions.
  1. +1 −1 consent/handler.go
  2. +5 −2 docs/api.swagger.json
  3. +1 −1 go.mod
  4. +3 −4 go.sum
  5. +589 −0 internal/configuration_provider_mock.go
  6. +552 −0 internal/registry_mock.go
  7. +1 −1 sdk/go/hydra/swagger/README.md
  8. +1 −1 sdk/go/hydra/swagger/accept_login_request.go
  9. +0 −57 sdk/go/hydra/swagger/admin_api.go
  10. +1 −1 sdk/go/hydra/swagger/docs/AcceptLoginRequest.md
  11. +0 −27 sdk/go/hydra/swagger/docs/AdminApi.md
  12. +28 −1 sdk/go/hydra/swagger/docs/PublicApi.md
  13. +58 −1 sdk/go/hydra/swagger/public_api.go
  14. +1 −1 sdk/java/hydra-client-resttemplate/README.md
  15. +1 −1 sdk/java/hydra-client-resttemplate/docs/AcceptLoginRequest.md
  16. +0 −41 sdk/java/hydra-client-resttemplate/docs/AdminApi.md
  17. +42 −1 sdk/java/hydra-client-resttemplate/docs/PublicApi.md
  18. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java
  19. +1 −32 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java
  20. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/HealthApi.java
  21. +33 −2 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java
  22. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/VersionApi.java
  23. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java
  24. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java
  25. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java
  26. +1 −1 ...java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java
  27. +2 −2 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java
  28. +1 −1 ...ava/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationSession.java
  29. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java
  30. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java
  31. +1 −1 ...ava/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java
  32. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/EmptyResponse.java
  33. +1 −1 ...lient-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java
  34. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java
  35. +1 −1 ...java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java
  36. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java
  37. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java
  38. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java
  39. +1 −1 ...a-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java
  40. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java
  41. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java
  42. +1 −1 .../hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java
  43. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java
  44. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java
  45. +1 −1 ...java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java
  46. +1 −1 ...va/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java
  47. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java
  48. +1 −1 ...lient-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerFlushInactiveAccessTokens.java
  49. +1 −1 ...va/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJsonWebKeyQuery.java
  50. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkCreateSet.java
  51. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkSetQuery.java
  52. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSet.java
  53. +1 −1 ...va/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSetKey.java
  54. +1 −1 ...lient-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthIntrospectionRequest.java
  55. +1 −1 ...ent-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerRevokeOAuth2TokenParameters.java
  56. +1 −1 ...ra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenParameters.java
  57. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java
  58. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java
  59. +1 −1 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java
  60. +1 −1 sdk/js/swagger/README.md
  61. +1 −1 sdk/js/swagger/docs/AcceptLoginRequest.md
  62. +0 −41 sdk/js/swagger/docs/AdminApi.md
  63. +42 −1 sdk/js/swagger/docs/PublicApi.md
  64. +0 −38 sdk/js/swagger/src/api/AdminApi.js
  65. +39 −1 sdk/js/swagger/src/api/PublicApi.js
  66. +3 −2 sdk/js/swagger/src/model/AcceptLoginRequest.js
  67. +1 −1 sdk/php/swagger/README.md
  68. +0 −41 sdk/php/swagger/docs/Api/AdminApi.md
  69. +42 −1 sdk/php/swagger/docs/Api/PublicApi.md
  70. +1 −1 sdk/php/swagger/docs/Model/AcceptLoginRequest.md
  71. +0 −76 sdk/php/swagger/lib/Api/AdminApi.php
  72. +76 −0 sdk/php/swagger/lib/Api/PublicApi.php
  73. +6 −0 sdk/php/swagger/lib/Model/AcceptLoginRequest.php
@@ -583,7 +583,7 @@ func (h *Handler) RejectConsentRequest(w http.ResponseWriter, r *http.Request, p
})
}

// swagger:route GET /oauth2/auth/sessions/login/revoke admin revokeUserLoginCookie
// swagger:route GET /oauth2/auth/sessions/login/revoke public revokeUserLoginCookie
//
// Logs user out by deleting the session cookie
//
@@ -1371,7 +1371,7 @@
"https"
],
"tags": [
"admin"
"public"
],
"summary": "Logs user out by deleting the session cookie",
"operationId": "revokeUserLoginCookie",
@@ -1558,7 +1558,7 @@
"oauth2": []
}
],
"description": "Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no\nlonger be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token.\nRevoking a refresh token also invalidates the access token that was created with it.",
"description": "Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no\nlonger be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token.\nRevoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by\nthe client the token was generated for.",
"consumes": [
"application/x-www-form-urlencoded"
],
@@ -1956,6 +1956,9 @@
"acceptLoginRequest": {
"type": "object",
"title": "The request payload used to accept a login request.",
"required": [
"subject"
],
"properties": {
"acr": {
"description": "ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.",
2 go.mod
@@ -79,7 +79,7 @@ require (
google.golang.org/appengine v1.5.0 // indirect
google.golang.org/genproto v0.0.0-20190321212433-e79c0c59cdb5 // indirect
google.golang.org/grpc v1.19.1 // indirect
gopkg.in/resty.v1 v1.9.1
gopkg.in/resty.v1 v1.12.0
gopkg.in/square/go-jose.v2 v2.3.0
)

7 go.sum
@@ -84,6 +84,7 @@ github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aev
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/go-bindata/go-bindata v3.1.1+incompatible h1:tR4f0e4VTO7LK6B2YWyAoVEzG9ByG1wrXB4TL9+jiYg=
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
@@ -739,8 +740,6 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk
golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/net v0.0.0-20180611182652-db08ff08e862 h1:JZi6BqOZ+iSgmLWe6llhGrNnEnK+YB/MRkStwnEfbqM=
golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -909,8 +908,8 @@ gopkg.in/gorp.v1 v1.7.2 h1:j3DWlAyGVv8whO7AcIWznQ2Yj7yJkn34B8s63GViAAw=
gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=
gopkg.in/resty.v1 v1.9.1 h1:Lq4EIBZ5e2J4ZWp22W2hVOYc0X1qwDDki/nNVchRbdw=
gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc=
gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/square/go-jose.v2 v2.1.9 h1:YCFbL5T2gbmC2sMG12s1x2PAlTK5TZNte3hjZEIcCAg=
gopkg.in/square/go-jose.v2 v2.1.9/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.2.2 h1:orlkJ3myw8CN1nVQHBFfloD+L3egixIa4FvUP6RosSA=

0 comments on commit 7c4b6d4

Please sign in to comment.
You can’t perform that action at this time.