PagibleAI CMS authenticates against entries of the Laravel users
table. To be able to use the GraphQL API, they need to be editors (use the artisan
command to set the editor role):
php artisan cms:editor editor@example.com
To remove editor privileges from an user account, use:
php artisan cms:editor --disable editor@example.com
Table of contents:
To authenticate for editing content:
mutation {
cmsLogin(email: "editor@example.com", password: "secret") {
name
email
}
}
{
"data": {
"cmsLogin": {
"name": "A CMS editor",
"email": "editor@example.com"
}
}
}
Retrieve information about the authenticated user:
query {
me {
name
email
}
}
{
"data": {
"me": {
"name": "A CMS editor",
"email": "editor@example.com"
}
}
}
To log the current user out of the application:
mutation {
cmsLogout {
name
email
}
}
{
"data": {
"cmsLogout": {
"name": "A CMS editor",
"email": "editor@example.com"
}
}
}