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.

79 lines
1.7 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
  27. loginTFA(
  28. loginToken: String!
  29. securityCode: String!
  30. ): DefaultResponse
  31. updateStrategies(
  32. strategies: [AuthenticationStrategyInput]
  33. ): DefaultResponse @auth(requires: ["manage:system"])
  34. }
  35. # -----------------------------------------------
  36. # TYPES
  37. # -----------------------------------------------
  38. type AuthenticationStrategy {
  39. isEnabled: Boolean!
  40. key: String!
  41. props: [String]
  42. title: String!
  43. description: String
  44. useForm: Boolean!
  45. logo: String
  46. color: String
  47. website: String
  48. icon: String
  49. config: [KeyValuePair] @auth(requires: ["manage:system"])
  50. selfRegistration: Boolean!
  51. domainWhitelist: [String]! @auth(requires: ["manage:system"])
  52. autoEnrollGroups: [Int]! @auth(requires: ["manage:system"])
  53. }
  54. type AuthenticationLoginResponse {
  55. responseResult: ResponseStatus
  56. jwt: String
  57. tfaRequired: Boolean
  58. tfaLoginToken: String
  59. }
  60. input AuthenticationStrategyInput {
  61. isEnabled: Boolean!
  62. key: String!
  63. config: [KeyValuePairInput]
  64. selfRegistration: Boolean!
  65. domainWhitelist: [String]!
  66. autoEnrollGroups: [Int]!
  67. }