2018-03-10 00:58:04 -05:00
|
|
|
# ===============================================
|
|
|
|
# AUTHENTICATION
|
|
|
|
# ===============================================
|
|
|
|
|
2018-03-05 15:49:36 -05:00
|
|
|
extend type Query {
|
|
|
|
authentication: AuthenticationQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
authentication: AuthenticationMutation
|
|
|
|
}
|
|
|
|
|
2018-03-10 00:58:04 -05:00
|
|
|
# -----------------------------------------------
|
|
|
|
# QUERIES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
2018-03-05 15:49:36 -05:00
|
|
|
type AuthenticationQuery {
|
2018-06-04 00:41:29 -04:00
|
|
|
strategies(
|
2018-10-08 00:17:31 -04:00
|
|
|
isEnabled: Boolean
|
2018-06-04 00:41:29 -04:00
|
|
|
): [AuthenticationStrategy]
|
2018-03-05 15:49:36 -05:00
|
|
|
}
|
|
|
|
|
2018-03-10 00:58:04 -05:00
|
|
|
# -----------------------------------------------
|
|
|
|
# MUTATIONS
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
2018-03-05 20:53:24 -05:00
|
|
|
type AuthenticationMutation {
|
2018-03-10 00:58:04 -05:00
|
|
|
login(
|
|
|
|
username: String!
|
|
|
|
password: String!
|
2018-06-17 11:12:11 -04:00
|
|
|
strategy: String!
|
2019-02-15 16:36:13 -05:00
|
|
|
): AuthenticationLoginResponse @rateLimit(limit: 5, duration: 60)
|
2018-03-10 00:58:04 -05:00
|
|
|
|
|
|
|
loginTFA(
|
|
|
|
loginToken: String!
|
|
|
|
securityCode: String!
|
2019-02-15 16:36:13 -05:00
|
|
|
): DefaultResponse @rateLimit(limit: 5, duration: 60)
|
2018-03-10 00:58:04 -05:00
|
|
|
|
2018-12-17 00:51:52 -05:00
|
|
|
register(
|
|
|
|
email: String!
|
|
|
|
password: String!
|
|
|
|
name: String!
|
|
|
|
): AuthenticationRegisterResponse
|
|
|
|
|
2018-06-25 20:55:00 -04:00
|
|
|
updateStrategies(
|
2019-01-06 22:03:34 -05:00
|
|
|
strategies: [AuthenticationStrategyInput]!
|
|
|
|
config: AuthenticationConfigInput
|
2018-10-14 17:38:39 -04:00
|
|
|
): DefaultResponse @auth(requires: ["manage:system"])
|
2018-03-05 20:53:24 -05:00
|
|
|
}
|
2018-03-05 15:49:36 -05:00
|
|
|
|
2018-03-10 00:58:04 -05:00
|
|
|
# -----------------------------------------------
|
|
|
|
# TYPES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
2018-06-04 00:41:29 -04:00
|
|
|
type AuthenticationStrategy {
|
2018-03-05 15:49:36 -05:00
|
|
|
isEnabled: Boolean!
|
|
|
|
key: String!
|
|
|
|
props: [String]
|
|
|
|
title: String!
|
2018-08-04 17:27:55 -04:00
|
|
|
description: String
|
2018-03-05 15:49:36 -05:00
|
|
|
useForm: Boolean!
|
2018-08-04 17:27:55 -04:00
|
|
|
logo: String
|
2018-10-08 00:17:31 -04:00
|
|
|
color: String
|
2018-08-04 17:27:55 -04:00
|
|
|
website: String
|
2018-03-05 15:49:36 -05:00
|
|
|
icon: String
|
2018-10-08 00:17:31 -04:00
|
|
|
config: [KeyValuePair] @auth(requires: ["manage:system"])
|
2018-06-25 02:44:40 -04:00
|
|
|
selfRegistration: Boolean!
|
2018-10-08 00:17:31 -04:00
|
|
|
domainWhitelist: [String]! @auth(requires: ["manage:system"])
|
|
|
|
autoEnrollGroups: [Int]! @auth(requires: ["manage:system"])
|
2018-03-05 15:49:36 -05:00
|
|
|
}
|
2018-03-10 00:58:04 -05:00
|
|
|
|
|
|
|
type AuthenticationLoginResponse {
|
2018-03-24 22:35:47 -04:00
|
|
|
responseResult: ResponseStatus
|
2018-10-08 00:17:31 -04:00
|
|
|
jwt: String
|
2018-03-10 00:58:04 -05:00
|
|
|
tfaRequired: Boolean
|
|
|
|
tfaLoginToken: String
|
|
|
|
}
|
2018-06-25 20:55:00 -04:00
|
|
|
|
2018-12-17 00:51:52 -05:00
|
|
|
type AuthenticationRegisterResponse {
|
|
|
|
responseResult: ResponseStatus
|
|
|
|
jwt: String
|
|
|
|
}
|
|
|
|
|
2018-06-25 20:55:00 -04:00
|
|
|
input AuthenticationStrategyInput {
|
|
|
|
isEnabled: Boolean!
|
|
|
|
key: String!
|
|
|
|
config: [KeyValuePairInput]
|
|
|
|
selfRegistration: Boolean!
|
|
|
|
domainWhitelist: [String]!
|
|
|
|
autoEnrollGroups: [Int]!
|
|
|
|
}
|
2019-01-06 22:03:34 -05:00
|
|
|
|
|
|
|
input AuthenticationConfigInput {
|
|
|
|
audience: String!
|
|
|
|
tokenExpiration: String!
|
|
|
|
tokenRenewal: String!
|
|
|
|
}
|