Added job_title to get payload

Change-Id: Ic456280ef9e0e83619cd23e6e6c069a684d4d9f4
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2021-02-03 15:52:14 -03:00
parent d9862bfc35
commit b23ed35d33
3 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,7 @@
**/
use App\Models\SSO\DisqusSSOProfile;
use Auth\User;
use Illuminate\Support\Facades\Log;
/**
* Class DisqusUserProfile
@ -95,7 +96,7 @@ class DisqusUserProfile
"email" => $this->user_email,
"avatar" => $this->user_avatar
];
Log::debug(sprintf("DisqusUserProfile::serialize %s", json_encode($data)));
$message = base64_encode(json_encode($data));
$timestamp = time();
$hmac = $this->dsq_hmacsha1($message . ' ' . $timestamp, $this->private_key);

View File

@ -152,6 +152,7 @@ final class UserService extends OAuth2ProtectedService implements IUserService
$data[StandardClaims::WeChatUser] = $current_user->getWechatUser();
$data[StandardClaims::TwitterName] = $current_user->getTwitterName();
$data[StandardClaims::Company] = $current_user->getCompany();
$data[StandardClaims::JobTitle] = $current_user->getJobTitle();
$data[StandardClaims::ShowPicture] = $current_user->isPublicProfileShowPhoto();
$data[StandardClaims::ShowFullName] = $current_user->isPublicProfileShowFullname();
$user_groups = [];
@ -207,6 +208,8 @@ final class UserService extends OAuth2ProtectedService implements IUserService
$claim_set->addClaim(new JWTClaim(StandardClaims::LinkedInProfile, new StringOrURI($user->getLinkedInProfile())));
$claim_set->addClaim(new JWTClaim(StandardClaims::ShowPicture, new JsonValue($user->isPublicProfileShowPhoto())));
$claim_set->addClaim(new JWTClaim(StandardClaims::ShowFullName, new JsonValue($user->isPublicProfileShowFullname())));
$claim_set->addClaim(new JWTClaim(StandardClaims::Company, new StringOrURI($user->getCompany())));
$claim_set->addClaim(new JWTClaim(StandardClaims::JobTitle, new StringOrURI($user->getJobTitle())));
$user_groups = [];

View File

@ -208,4 +208,10 @@ abstract class StandardClaims
* Company
*/
const Company = 'company';
/**
* Company
*/
const JobTitle = 'job_title';
}