|
|
|
# ===============================================
|
|
|
|
# AUTHENTICATION
|
|
|
|
# ===============================================
|
|
|
|
|
|
|
|
extend type Query {
|
|
|
|
authentication: AuthenticationQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
authentication: AuthenticationMutation
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# QUERIES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type AuthenticationQuery {
|
|
|
|
providers(
|
|
|
|
filter: String
|
|
|
|
orderBy: String
|
|
|
|
): [AuthenticationProvider]
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# MUTATIONS
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type AuthenticationMutation {
|
|
|
|
login(
|
|
|
|
username: String!
|
|
|
|
password: String!
|
|
|
|
provider: String!
|
|
|
|
): AuthenticationLoginResponse
|
|
|
|
|
|
|
|
loginTFA(
|
|
|
|
loginToken: String!
|
|
|
|
securityCode: String!
|
|
|
|
): DefaultResponse
|
|
|
|
|
|
|
|
updateProvider(
|
|
|
|
provider: String!
|
|
|
|
isEnabled: Boolean!
|
|
|
|
config: [KeyValuePairInput]
|
|
|
|
): DefaultResponse
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# TYPES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type AuthenticationProvider {
|
|
|
|
isEnabled: Boolean!
|
|
|
|
key: String!
|
|
|
|
props: [String]
|
|
|
|
title: String!
|
|
|
|
useForm: Boolean!
|
|
|
|
icon: String
|
|
|
|
config: [KeyValuePair]
|
|
|
|
}
|
|
|
|
|
|
|
|
type AuthenticationLoginResponse {
|
|
|
|
responseResult: ResponseStatus
|
|
|
|
tfaRequired: Boolean
|
|
|
|
tfaLoginToken: String
|
|
|
|
}
|