telabotanica / tb-auth-php
A library that helps integrating your PHP software with Tela Botanica's SSO
0.2.0
2020-01-07 15:45 UTC
Requires
- php: >=5.3.0
README
A library that helps integrating your PHP webservices with Tela Botanica's SSO
install
composer install telabotanica/tb-auth-php
usage
$config = array( "annuaireURL" => "https://www.tela-botanica.org/uri-of-sso-service", "admins" => array( "john@example.org", "mary@othersite.org" ), "adminRoles" => array( "tb_my-application_admin" ) ); $auth = new AuthTB($config); $userData = $auth->getUser();
config parameters
mandatory
- annuaireURL : URL of Tela Botanica SSO service
optional
- 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