Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 1.07 KB

README.md

File metadata and controls

34 lines (30 loc) · 1.07 KB

tb-auth-php

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(
		"[email protected]",
		"[email protected]"
	),
	"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 return true
  • adminRoles : a list of roles whose members will be considered as "admins", ie isAdmin() will return true
  • authorizedIPs : a list of IP addresses for the which hasAuthorizedIP() will return true