wikijs-fork/server/graph/schemas/authentication.graphql

102 lines
2.3 KiB
GraphQL
Raw Normal View History

# ===============================================
# AUTHENTICATION
# ===============================================
extend type Query {
authentication: AuthenticationQuery
}
extend type Mutation {
authentication: AuthenticationMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type AuthenticationQuery {
2018-06-04 04:41:29 +00:00
strategies(
isEnabled: Boolean
2018-06-04 04:41:29 +00:00
): [AuthenticationStrategy]
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type AuthenticationMutation {
login(
username: String!
password: String!
2018-06-17 15:12:11 +00:00
strategy: String!
2019-02-15 21:36:13 +00:00
): AuthenticationLoginResponse @rateLimit(limit: 5, duration: 60)
loginTFA(
loginToken: String!
securityCode: String!
2019-02-15 21:36:13 +00:00
): DefaultResponse @rateLimit(limit: 5, duration: 60)
register(
email: String!
password: String!
name: String!
): AuthenticationRegisterResponse
2018-06-26 00:55:00 +00:00
updateStrategies(
2019-01-07 03:03:34 +00:00
strategies: [AuthenticationStrategyInput]!
config: AuthenticationConfigInput
2018-10-14 21:38:39 +00:00
): DefaultResponse @auth(requires: ["manage:system"])
regenerateCertificates: DefaultResponse @auth(requires: ["manage:system"])
resetGuestUser: DefaultResponse @auth(requires: ["manage:system"])
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
2018-06-04 04:41:29 +00:00
type AuthenticationStrategy {
isEnabled: Boolean!
key: String!
props: [String]
title: String!
2018-08-04 21:27:55 +00:00
description: String
isAvailable: Boolean
useForm: Boolean!
2018-08-04 21:27:55 +00:00
logo: String
color: String
2018-08-04 21:27:55 +00:00
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
}
2018-06-26 00:55:00 +00:00
type AuthenticationRegisterResponse {
responseResult: ResponseStatus
jwt: String
}
2018-06-26 00:55:00 +00:00
input AuthenticationStrategyInput {
isEnabled: Boolean!
key: String!
config: [KeyValuePairInput]
selfRegistration: Boolean!
domainWhitelist: [String]!
autoEnrollGroups: [Int]!
}
2019-01-07 03:03:34 +00:00
input AuthenticationConfigInput {
audience: String!
tokenExpiration: String!
tokenRenewal: String!
}