mirror of https://github.com/requarks/wiki
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.
80 lines
1.7 KiB
80 lines
1.7 KiB
# ===============================================
|
|
# AUTHENTICATION
|
|
# ===============================================
|
|
|
|
extend type Query {
|
|
authentication: AuthenticationQuery
|
|
}
|
|
|
|
extend type Mutation {
|
|
authentication: AuthenticationMutation
|
|
}
|
|
|
|
# -----------------------------------------------
|
|
# QUERIES
|
|
# -----------------------------------------------
|
|
|
|
type AuthenticationQuery {
|
|
strategies(
|
|
isEnabled: Boolean
|
|
): [AuthenticationStrategy]
|
|
}
|
|
|
|
# -----------------------------------------------
|
|
# MUTATIONS
|
|
# -----------------------------------------------
|
|
|
|
type AuthenticationMutation {
|
|
login(
|
|
username: String!
|
|
password: String!
|
|
strategy: String!
|
|
): AuthenticationLoginResponse
|
|
|
|
loginTFA(
|
|
loginToken: String!
|
|
securityCode: String!
|
|
): DefaultResponse
|
|
|
|
updateStrategies(
|
|
strategies: [AuthenticationStrategyInput]
|
|
): DefaultResponse @auth(requires: ["manage:system"])
|
|
}
|
|
|
|
# -----------------------------------------------
|
|
# TYPES
|
|
# -----------------------------------------------
|
|
|
|
type AuthenticationStrategy {
|
|
isEnabled: Boolean!
|
|
key: String!
|
|
props: [String]
|
|
title: String!
|
|
description: String
|
|
useForm: Boolean!
|
|
logo: String
|
|
color: String
|
|
website: String
|
|
icon: String
|
|
config: [KeyValuePair] @auth(requires: ["manage:system"])
|
|
selfRegistration: Boolean!
|
|
domainWhitelist: [String]! @auth(requires: ["manage:system"])
|
|
autoEnrollGroups: [Int]! @auth(requires: ["manage:system"])
|
|
}
|
|
|
|
type AuthenticationLoginResponse {
|
|
responseResult: ResponseStatus
|
|
jwt: String
|
|
tfaRequired: Boolean
|
|
tfaLoginToken: String
|
|
}
|
|
|
|
input AuthenticationStrategyInput {
|
|
isEnabled: Boolean!
|
|
key: String!
|
|
config: [KeyValuePairInput]
|
|
selfRegistration: Boolean!
|
|
domainWhitelist: [String]!
|
|
autoEnrollGroups: [Int]!
|
|
}
|