Initialized IDE-project with existing files
This commit is contained in:
parent
f1f973ff04
commit
6e2b5c0ca6
@ -18,10 +18,10 @@ function authenticateLDAP (string $username, string $password) {
|
|||||||
$strFullname = ldap_get_entries($ds, $ldapSearchResults)[0]['cn'][0];
|
$strFullname = ldap_get_entries($ds, $ldapSearchResults)[0]['cn'][0];
|
||||||
// Create JWT-payload
|
// Create JWT-payload
|
||||||
$jwtPayload = [
|
$jwtPayload = [
|
||||||
'iat' => time(), // Issued at: time when the token was generated
|
'iat' => time(), // Issued at: time when the token was generated
|
||||||
'iss' => $_SERVER['SERVER_NAME'], // Issuer
|
'iss' => $_SERVER['SERVER_NAME'], // Issuer
|
||||||
'sub' => $strGivenname, // Subject (ie. username)
|
'sub' => $strGivenname, // Subject (ie. username)
|
||||||
'name' => $strFullname // Full name (as retrieved from AD)
|
'name' => $strFullname // Full name (as retrieved from AD)
|
||||||
];
|
];
|
||||||
|
|
||||||
$secureToken = JWT::encode($jwtPayload, base64_decode($settings->JWT['PrivateKey_base64']));
|
$secureToken = JWT::encode($jwtPayload, base64_decode($settings->JWT['PrivateKey_base64']));
|
||||||
|
Loading…
Reference in New Issue
Block a user