# new UBSession ()
Members
# authSchema : string instance
Name of authentication schema
# userData : object instance
Contain custom user data. Usually filled inside server onUserLogon
event handlers
Do not use it directly, instead use helper method SyncConnection.userData() instead.
Methods
# authHeader (authMockopt: boolean) → string instance
Return authorization header
Arguments:
authMock
= false: boolean
$App.connection.authorize().then(function(session){
return {Authorization: session.authHeader()}
})
# crc32 (s: string, polynomialopt: number, initialValueopt: number, finalXORValueopt: number) → number instance
Calculate CRC32 checksum for UTF8 string representation
# hexa8 (value: string) → string instance
Return hexadecimal string of 8 character length from value
# isAnonymous () → boolean instance
Current session is anonymous session
# signature (authMockopt: boolean) → string instance
Session signature for authorized request. Can be added as LAST parameter in url, or to Authorization header (preferred way)
Arguments:
authMock
: boolean
$App.connection.authorize().then(function(session) {
// for URL
return 'session_signature=' + session.signature()
//for header
return { Authorization: session.authSchema + ' ' + session.signature() }
})