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.

107 lines
2.5 KiB

  1. # ===============================================
  2. # AUTHENTICATION
  3. # ===============================================
  4. extend type Query {
  5. authentication: AuthenticationQuery
  6. }
  7. extend type Mutation {
  8. authentication: AuthenticationMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type AuthenticationQuery {
  14. strategies(
  15. isEnabled: Boolean
  16. ): [AuthenticationStrategy]
  17. }
  18. # -----------------------------------------------
  19. # MUTATIONS
  20. # -----------------------------------------------
  21. type AuthenticationMutation {
  22. login(
  23. username: String!
  24. password: String!
  25. strategy: String!
  26. ): AuthenticationLoginResponse @rateLimit(limit: 5, duration: 60)
  27. loginTFA(
  28. continuationToken: String!
  29. securityCode: String!
  30. ): AuthenticationLoginResponse @rateLimit(limit: 5, duration: 60)
  31. loginChangePassword(
  32. continuationToken: String!
  33. newPassword: String!
  34. ): AuthenticationLoginResponse @rateLimit(limit: 5, duration: 60)
  35. register(
  36. email: String!
  37. password: String!
  38. name: String!
  39. ): AuthenticationRegisterResponse
  40. updateStrategies(
  41. strategies: [AuthenticationStrategyInput]!
  42. config: AuthenticationConfigInput
  43. ): DefaultResponse @auth(requires: ["manage:system"])
  44. regenerateCertificates: DefaultResponse @auth(requires: ["manage:system"])
  45. resetGuestUser: DefaultResponse @auth(requires: ["manage:system"])
  46. }
  47. # -----------------------------------------------
  48. # TYPES
  49. # -----------------------------------------------
  50. type AuthenticationStrategy {
  51. isEnabled: Boolean!
  52. key: String!
  53. props: [String]
  54. title: String!
  55. description: String
  56. isAvailable: Boolean
  57. useForm: Boolean!
  58. logo: String
  59. color: String
  60. website: String
  61. icon: String
  62. config: [KeyValuePair] @auth(requires: ["manage:system"])
  63. selfRegistration: Boolean!
  64. domainWhitelist: [String]! @auth(requires: ["manage:system"])
  65. autoEnrollGroups: [Int]! @auth(requires: ["manage:system"])
  66. }
  67. type AuthenticationLoginResponse {
  68. responseResult: ResponseStatus
  69. jwt: String
  70. mustChangePwd: Boolean
  71. mustProvideTFA: Boolean
  72. continuationToken: String
  73. }
  74. type AuthenticationRegisterResponse {
  75. responseResult: ResponseStatus
  76. jwt: String
  77. }
  78. input AuthenticationStrategyInput {
  79. isEnabled: Boolean!
  80. key: String!
  81. config: [KeyValuePairInput]
  82. selfRegistration: Boolean!
  83. domainWhitelist: [String]!
  84. autoEnrollGroups: [Int]!
  85. }
  86. input AuthenticationConfigInput {
  87. audience: String!
  88. tokenExpiration: String!
  89. tokenRenewal: String!
  90. }