Manual Reference Source Test
import IdentityUser from 'src/modules/identity-user.js'
public class | source

IdentityUser

Identity user

This will have a selection of properties defined by the active IdentityConfig#properties.

For a list of standard properties see: IdentityProperty.standardMap.

Static Member Summary

Static Public Members
public static get

serverKeyMap: Map<string, string>: {"id": string, "revisionId": string, "email": string, "username": string, "password": string, "firstName": string, "lastName": string, "phone": string, "address": string, "address2": string, "zip": string, "zipCode": string, "state": string, "birthday": string, "tcDate": string}

Map from user property keys used by the SDK to those used by the server

Constructor Summary

Public Constructor
public

constructor(config: IdentityConfig, properties: Object)

IdentityUser constructor

Member Summary

Public Members
public

Save properties to the IdentityUser object

Static Public Members

public static get serverKeyMap: Map<string, string>: {"id": string, "revisionId": string, "email": string, "username": string, "password": string, "firstName": string, "lastName": string, "phone": string, "address": string, "address2": string, "zip": string, "zipCode": string, "state": string, "birthday": string, "tcDate": string} source

Map from user property keys used by the SDK to those used by the server

  • id => _id
  • revisionId => _rev
  • birthday => DOB
  • firstName => givenName
  • email => mail
  • address => postalAddress
  • zip => serviceZip
  • zipCode => serviceZip
  • lastName => sn
  • state => stateProvince
  • phone => telephoneNumber
  • tcDate => termsAndConditionsAgreementDate
  • username => userName

Return:

Map<string, string>

Public Constructors

public constructor(config: IdentityConfig, properties: Object) source

IdentityUser constructor

Only properties specified in the config will be copied to this instance.

The IdentityUser.serverKeyMap will be automatically applied to change property keys as necessary. E.g: If you provide {givenName: 'foo'} this will be equivalent to providing {firstName: 'foo'}

Params:

NameTypeAttributeDescription
config IdentityConfig

Identity config

properties Object
  • optional
  • default: {}

Object with property values

Public Members

public [key]: Object source

Save properties to the IdentityUser object