2018-03-10 05:58:04 +00:00
|
|
|
# ===============================================
|
|
|
|
# AUTHENTICATION
|
|
|
|
# ===============================================
|
|
|
|
|
2018-03-05 20:49:36 +00:00
|
|
|
extend type Query {
|
|
|
|
authentication: AuthenticationQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
authentication: AuthenticationMutation
|
|
|
|
}
|
|
|
|
|
2018-03-10 05:58:04 +00:00
|
|
|
# -----------------------------------------------
|
|
|
|
# QUERIES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
2018-03-05 20:49:36 +00:00
|
|
|
type AuthenticationQuery {
|
2018-06-04 04:41:29 +00:00
|
|
|
strategies(
|
2018-10-08 04:17:31 +00:00
|
|
|
isEnabled: Boolean
|
2018-06-04 04:41:29 +00:00
|
|
|
): [AuthenticationStrategy]
|
2018-03-05 20:49:36 +00:00
|
|
|
}
|
|
|
|
|
2018-03-10 05:58:04 +00:00
|
|
|
# -----------------------------------------------
|
|
|
|
# MUTATIONS
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
2018-03-06 01:53:24 +00:00
|
|
|
type AuthenticationMutation {
|
2018-03-10 05:58:04 +00:00
|
|
|
login(
|
|
|
|
username: String!
|
|
|
|
password: String!
|
2018-06-17 15:12:11 +00:00
|
|
|
strategy: String!
|
2018-03-10 05:58:04 +00:00
|
|
|
): AuthenticationLoginResponse
|
|
|
|
|
|
|
|
loginTFA(
|
|
|
|
loginToken: String!
|
|
|
|
securityCode: String!
|
|
|
|
): DefaultResponse
|
|
|
|
|
2018-06-26 00:55:00 +00:00
|
|
|
updateStrategies(
|
|
|
|
strategies: [AuthenticationStrategyInput]
|
2018-03-06 01:53:24 +00:00
|
|
|
): DefaultResponse
|
|
|
|
}
|
2018-03-05 20:49:36 +00:00
|
|
|
|
2018-03-10 05:58:04 +00:00
|
|
|
# -----------------------------------------------
|
|
|
|
# TYPES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
2018-06-04 04:41:29 +00:00
|
|
|
type AuthenticationStrategy {
|
2018-03-05 20:49:36 +00:00
|
|
|
isEnabled: Boolean!
|
|
|
|
key: String!
|
|
|
|
props: [String]
|
|
|
|
title: String!
|
2018-08-04 21:27:55 +00:00
|
|
|
description: String
|
2018-03-05 20:49:36 +00:00
|
|
|
useForm: Boolean!
|
2018-08-04 21:27:55 +00:00
|
|
|
logo: String
|
2018-10-08 04:17:31 +00:00
|
|
|
color: String
|
2018-08-04 21:27:55 +00:00
|
|
|
website: String
|
2018-03-05 20:49:36 +00:00
|
|
|
icon: String
|
2018-10-08 04:17:31 +00:00
|
|
|
config: [KeyValuePair] @auth(requires: ["manage:system"])
|
2018-06-25 06:44:40 +00:00
|
|
|
selfRegistration: Boolean!
|
2018-10-08 04:17:31 +00:00
|
|
|
domainWhitelist: [String]! @auth(requires: ["manage:system"])
|
|
|
|
autoEnrollGroups: [Int]! @auth(requires: ["manage:system"])
|
2018-03-05 20:49:36 +00:00
|
|
|
}
|
2018-03-10 05:58:04 +00:00
|
|
|
|
|
|
|
type AuthenticationLoginResponse {
|
2018-03-25 02:35:47 +00:00
|
|
|
responseResult: ResponseStatus
|
2018-10-08 04:17:31 +00:00
|
|
|
jwt: String
|
2018-03-10 05:58:04 +00:00
|
|
|
tfaRequired: Boolean
|
|
|
|
tfaLoginToken: String
|
|
|
|
}
|
2018-06-26 00:55:00 +00:00
|
|
|
|
|
|
|
input AuthenticationStrategyInput {
|
|
|
|
isEnabled: Boolean!
|
|
|
|
key: String!
|
|
|
|
config: [KeyValuePairInput]
|
|
|
|
selfRegistration: Boolean!
|
|
|
|
domainWhitelist: [String]!
|
|
|
|
autoEnrollGroups: [Int]!
|
|
|
|
}
|