2017-10-01 03:47:14 +00:00
|
|
|
import gql from 'graphql-tag'
|
|
|
|
|
|
|
|
export default {
|
2018-03-06 01:53:24 +00:00
|
|
|
AUTHENTICATION: {
|
|
|
|
QUERY_PROVIDERS: gql`
|
|
|
|
query {
|
|
|
|
authentication {
|
|
|
|
providers {
|
|
|
|
isEnabled
|
|
|
|
key
|
|
|
|
props
|
|
|
|
title
|
|
|
|
useForm
|
|
|
|
config {
|
|
|
|
key
|
|
|
|
value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-10-01 03:47:14 +00:00
|
|
|
}
|
2018-03-09 05:33:43 +00:00
|
|
|
`,
|
|
|
|
QUERY_LOGIN_PROVIDERS: gql`
|
|
|
|
query {
|
|
|
|
authentication {
|
|
|
|
providers(
|
|
|
|
filter: "isEnabled eq true",
|
|
|
|
orderBy: "title ASC"
|
|
|
|
) {
|
|
|
|
key
|
|
|
|
title
|
|
|
|
useForm
|
|
|
|
icon
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-03-06 01:53:24 +00:00
|
|
|
`
|
|
|
|
},
|
2017-10-01 03:47:14 +00:00
|
|
|
GQL_QUERY_TRANSLATIONS: gql`
|
|
|
|
query($locale: String!, $namespace: String!) {
|
|
|
|
translations(locale:$locale, namespace:$namespace) {
|
|
|
|
key
|
|
|
|
value
|
|
|
|
}
|
|
|
|
}
|
2018-01-10 01:41:53 +00:00
|
|
|
`,
|
|
|
|
GQL_MUTATION_LOGIN: gql`
|
|
|
|
mutation($username: String!, $password: String!, $provider: String!) {
|
|
|
|
login(username: $username, password: $password, provider: $provider) {
|
|
|
|
succeeded
|
|
|
|
message
|
|
|
|
tfaRequired
|
|
|
|
tfaLoginToken
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`,
|
|
|
|
GQL_MUTATION_LOGINTFA: gql`
|
|
|
|
mutation($loginToken: String!, $securityCode: String!) {
|
|
|
|
loginTFA(loginToken: $loginToken, securityCode: $securityCode) {
|
|
|
|
succeeded
|
|
|
|
message
|
|
|
|
}
|
|
|
|
}
|
2017-10-01 03:47:14 +00:00
|
|
|
`
|
|
|
|
}
|