You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.6 KiB

  1. import gql from 'graphql-tag'
  2. export default {
  3. AUTHENTICATION: {
  4. QUERY_PROVIDERS: gql`
  5. query {
  6. authentication {
  7. providers {
  8. isEnabled
  9. key
  10. props
  11. title
  12. useForm
  13. config {
  14. key
  15. value
  16. }
  17. }
  18. }
  19. }
  20. `,
  21. QUERY_LOGIN_PROVIDERS: gql`
  22. query {
  23. authentication {
  24. providers(
  25. filter: "isEnabled eq true",
  26. orderBy: "title ASC"
  27. ) {
  28. key
  29. title
  30. useForm
  31. icon
  32. }
  33. }
  34. }
  35. `,
  36. MUTATION_LOGIN: gql`
  37. mutation($username: String!, $password: String!, $provider: String!) {
  38. authentication {
  39. login(username: $username, password: $password, provider: $provider) {
  40. operation {
  41. succeeded
  42. code
  43. slug
  44. message
  45. }
  46. tfaRequired
  47. tfaLoginToken
  48. }
  49. }
  50. }
  51. `,
  52. MUTATION_LOGINTFA: gql`
  53. mutation($loginToken: String!, $securityCode: String!) {
  54. authentication {
  55. loginTFA(loginToken: $loginToken, securityCode: $securityCode) {
  56. operation {
  57. succeeded
  58. code
  59. slug
  60. message
  61. }
  62. }
  63. }
  64. }
  65. `
  66. },
  67. TRANSLATIONS: {
  68. QUERY_NAMESPACE: gql`
  69. query($locale: String!, $namespace: String!) {
  70. translations(locale:$locale, namespace:$namespace) {
  71. key
  72. value
  73. }
  74. }
  75. `
  76. }
  77. }