A library that helps integrating your PHP webservices with Tela Botanica's SSO
composer install telabotanica/tb-auth-php
$config = array(
"annuaireURL" => "https://www.tela-botanica.org/uri-of-sso-service",
"admins" => array(
"[email protected]",
"[email protected]"
),
"adminRoles" => array(
"tb_my-application_admin"
)
);
$auth = new AuthTB($config);
$userData = $auth->getUser();
- annuaireURL : URL of Tela Botanica SSO service
- ignoreSSLIssues : if
true
, curl will be lazy on SSL host verification, and prevent errors with old versions of libssl - headerName : expected header to read the token from (defaults to "Authorization")
- admins : a list of email addresses of people who will be considered as "admins", ie
isAdmin()
will returntrue
- adminRoles : a list of roles whose members will be considered as "admins", ie
isAdmin()
will returntrue
- authorizedIPs : a list of IP addresses for the which
hasAuthorizedIP()
will returntrue