invalidate-token.asciidoc 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --
  2. :api: invalidate-token
  3. :request: InvalidateTokenRequest
  4. :response: InvalidateTokenResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Invalidate Token API
  8. [id="{upid}-{api}-request"]
  9. ==== Invalidate Token Request
  10. The +{request}+ supports invalidating
  11. . A specific token, that can be either an _access token_ or a _refresh token_
  12. . All tokens (both _access tokens_ and _refresh tokens_) for a specific realm
  13. . All tokens (both _access tokens_ and _refresh tokens_) for a specific user
  14. . All tokens (both _access tokens_ and _refresh tokens_) for a specific user in a specific realm
  15. ===== Specific access token
  16. ["source","java",subs="attributes,callouts,macros"]
  17. --------------------------------------------------
  18. include-tagged::{doc-tests-file}[invalidate-access-token-request]
  19. --------------------------------------------------
  20. ===== Specific refresh token
  21. ["source","java",subs="attributes,callouts,macros"]
  22. --------------------------------------------------
  23. include-tagged::{doc-tests-file}[invalidate-refresh-token-request]
  24. --------------------------------------------------
  25. ===== All tokens for realm
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[invalidate-realm-tokens-request]
  29. --------------------------------------------------
  30. ===== All tokens for user
  31. ["source","java",subs="attributes,callouts,macros"]
  32. --------------------------------------------------
  33. include-tagged::{doc-tests-file}[invalidate-user-tokens-request]
  34. --------------------------------------------------
  35. ===== All tokens for user in realm
  36. ["source","java",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. include-tagged::{doc-tests-file}[invalidate-user-realm-tokens-request]
  39. --------------------------------------------------
  40. include::../execution.asciidoc[]
  41. [id="{upid}-{api}-response"]
  42. ==== Invalidate Token Response
  43. The returned +{response}+ contains the information regarding the tokens that the request
  44. invalidated.
  45. `invalidatedTokens`:: Available using `getInvalidatedTokens` denotes the number of tokens
  46. that this request invalidated.
  47. `previouslyInvalidatedTokens`:: Available using `getPreviouslyInvalidatedTokens` denotes
  48. the number of tokens that this request attempted to invalidate
  49. but were already invalid.
  50. `errors`:: Available using `getErrors` contains possible errors that were encountered while
  51. attempting to invalidate specific tokens.
  52. ["source","java",subs="attributes,callouts,macros"]
  53. --------------------------------------------------
  54. include-tagged::{doc-tests-file}[{api}-response]
  55. --------------------------------------------------