@datalayer/core
Version:
**Datalayer Core**
30 lines (29 loc) • 741 B
JavaScript
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the Modified BSD License.
*/
import { asDisplayName } from '../utils';
export class LinkedInUser {
iamProvider = 'linkedin';
sub;
email_verified;
name;
given_name;
displayName;
family_name;
email;
picture;
constructor(u) {
this.sub = u.sub;
this.email_verified = u.email_verified;
this.name = u.sub;
this.given_name = u.given_name;
this.family_name = u.family_name;
this.email = u.email;
this.picture = u.picture;
this.displayName = asDisplayName(this.given_name, this.family_name);
}
getUrn() {
return `urn:li:person:${this.sub}`;
}
}