DirectLease\Auth0\ApiController
Class Auth0ApiController
- Author: Arno Bor
Synopsis
class ApiController
extends Controller
{
- // members
- private static array $allowed_actions = ;
- private $member;
- private $auth0;
- private $domain;
- private $client_id;
- private $client_secret;
- private $redirect_uri;
- private $scope;
- private $default_email;
- private $namespace;
- private $url;
- private $persistent_login;
- // methods
- public void __construct()
- public void signup()
- public void login()
- public void logout()
- public bool callback()
- public mixed getIdByEmail()
- public mixed checkAndCreateAuth0UserAccount()
- public void updateProfile()
- public bool|Object|string updateUserMetadata()
- public void sendVerificationMail()
- public bool requestChangePassword()
- private Member|null updateUserData()
- private mixed createAuth0UserAccount()
- private Object getAuth0Token()
- private void parseMetadata()
- private mixed getDefaultMailaddress()
- private void call_auth0()
- private void setup()
Hierarchy
Extends
- SilverStripe\Control\Controller
Tasks
Line | Task |
---|---|
371 | make a setting if you use the firstname and lastname from auth0 |
463 | sanity check for m2m config settings |
Members
private
- $allowed_actions — array
- $auth0
- $client_id
- $client_secret
- $default_email
- $domain
- $member
- $namespace
- $persistent_login
- $redirect_uri
- $scope
- $url
Methods
private
- call_auth0()
- createAuth0UserAccount() — Create an user account for the member on Auth0
- getAuth0Token() — Retrieve a Auth0 Token
- getDefaultMailaddress()
- parseMetadata()
- setup()
- updateUserData() — Update the userdata in SS
public
- __construct()
- callback() — Get the authenticated user and login in SS
- checkAndCreateAuth0UserAccount()
- getIdByEmail() — A function that for given email returns the auth0id can be used when initing this controller and than call this function This function is not exposed externally
- login()
- logout()
- requestChangePassword() — For given email sent change password request mail
- sendVerificationMail()
- signup()
- updateProfile()
- updateUserMetadata() — POST: Update user metadata on Auth0