public class Login extends DBObject implements ReloadEventListener, PasswordRecord
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
Login associates a person with their Access group.
|
static java.lang.String |
DBCLASS_NAME
Login associates a person with their Access group.
|
static java.lang.String |
DEVICE_VERIFICATION_UUID |
static java.lang.String |
DIGEST_REALM
The digest realm.
|
static java.lang.String |
LOGIN_GUEST
Special login GUEST
|
static java.lang.String |
MODE_HYBRID
Hybrid
|
static java.lang.String |
MODE_TRANSPARENT
TRANSPARENT
|
static java.lang.String |
PASSWORD_HANDLER |
static java.lang.String |
PASSWORD_RESTRICTION_BYPASS
accept the password as is
|
static java.lang.String |
REALM
Our realm.
|
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Constructor and Description |
---|
Login(DBClass def,
DataSource dataSource)
Std.
|
Modifier and Type | Method and Description |
---|---|
static Session |
activateWebSession(Session session,
boolean makeCurrentSession) |
boolean |
canCreateLogins(java.lang.String... args) |
boolean |
canCreateRecord(DBClassConcrete dbClass)
Can this login create ANY records of this class ?
|
boolean |
canDeleteRecords(DBClassConcrete dbClass)
Can this login delete ANY records of this class ?
|
boolean |
canModifyRecords(DBClassConcrete dbClass)
Can this login modify ANY records of this class ?
|
boolean |
canReadRecords(DBClassConcrete dbClass)
Can this login read ANY records of this class ?
|
protected void |
checkAtLeastOneOwner()
check that there is one owner.
|
static java.lang.String |
checkPassword(VirtualDB layer,
java.lang.String password)
Is this a valid password for this layer ?
Is it the right length etc.
|
static Login |
create(MutableDataSource mds)
Make a new instance of this class.
|
Session |
createRemoteSession(java.lang.String password,
LoginContext loginContext,
java.lang.String remoteHost)
May not login remotely if password has expired
We allow multiple remote connections for a user as they maybe using word and Excel.
|
Session |
createWebSession(java.lang.String password,
LoginContext loginContext,
java.lang.String agent,
java.lang.String host,
java.lang.String clientURL)
Create a session to be used via the web.
|
Session |
createWebSession(java.lang.String password,
LoginContext loginContext,
java.lang.String agent,
java.lang.String host,
java.lang.String clientURL,
boolean useMagicNumber)
Create a session to be used via the web.
|
java.lang.String |
displayName()
The display name for this login.
|
protected void |
eventDataLoaded()
Clear out the cache on load.
|
protected void |
eventFieldUpdated(DBField field,
java.lang.Object previous,
GlobalKey previousKey,
FldParams params)
Update force expire and last updated
|
void |
eventReload(DBObject obj)
Called when a watched DBObject is reloaded, internally or externally.
|
protected void |
extCheckDeleteAccess()
Additional access checking for DELETE access for this object.
|
protected void |
extCheckModifyAccess()
Additional access checking for write access of this object.
|
protected void |
extCheckModifyAccess(DBField field)
Check that you are able to modify any login to be able to modify.
|
protected void |
extFixUp()
The extended fix up routine for known problems.
|
protected GlobalKey |
extGetDerivedGlobalKey(DBField field,
FldParams params)
OVERRIDE This method to return a derived global key.
|
protected java.lang.Object |
extGetDerivedValue(DBField field,
FldParams params)
Calculate the derived value for this field.
|
protected java.lang.Object |
extGetValue(DBField field,
FldParams params)
This method will masks the default value returned to the user.
|
protected void |
extPreSaveRecord()
OVERRIDE this method to add functionality to stSoftware BEFORE saving the record to the database.
|
protected void |
extPreValidate()
Update the in-memory universe BEFORE validating
|
protected void |
extSetValue(DBField field,
java.lang.Object orgValue,
FldParams params)
We prevent some values from being set by a user.
|
protected void |
extValidateDelete(ValidationList list)
Validate a record which is about to be deleted
|
protected ValidationError |
extValidateField(DBField field,
ValidationList list)
Validate that the password is OK.
|
protected void |
extValidateRecord(ValidationList list)
Performs additional validations on this record.
|
DBMagicNumber |
findActivationMagicNumber(java.lang.String... args)
The Magic Number code used to activate this login.
|
Company |
findCurrentBusUnit(java.lang.String... args)
Current business unit associated with the current login.
|
DBRelease |
findCurrentRelease(java.lang.String... args)
The current release.
|
DBLanguage |
findDefaultLanguage(java.lang.String... args)
The default language for this login.
|
static Login |
findKey(DataSource ds,
java.lang.String key)
Find the target for this class by the primary key
|
static Login |
findLogin(java.lang.String signature,
java.lang.String userName)
a short hand method to find the login for a user
|
DBTriStateOption |
findMfaCodeVerification(java.lang.String... args)
Also known as One-Time Password (OTP) via SMS, this method requires
users to input a code that is sent to their mobile phone via SMS.
|
DBTriStateOption |
findMfaVerifyNewBrowser(java.lang.String... args)
This process, known as device recognition and email confirmation,
verifies a user's identity when they log in from a new browser.
|
Person |
findPerson(java.lang.String... args)
The person
|
DBPasswordStorage |
findRequiredStorageAlgorithm(java.lang.String... args)
The required storage algorithm to use for this login.
|
static GlobalKey |
findSingleKey(VirtualDB layer,
java.lang.String usernameOrEmail) |
DBPasswordStorage |
findStorageAlgorithm(java.lang.String... args)
The password storage algorithm.
|
DBPasswordStorage |
findStorageAlgorithmCalculated(java.lang.String... args)
The storage algorithm to use.
|
DBTimeZone |
findTimeZone(java.lang.String... args)
The overriding timezone.
|
int |
generateNextBatch()
Get the user batch number
|
AccessGroup |
getAccessGroup() |
DBMagicNumber |
getActivationMagicNumber(java.lang.String... args) |
Login |
getBaseLogin() |
int |
getBatchNumber(java.lang.String... args) |
DBCriteria |
getCreateCriteria(DBClassConcrete cls)
The CREATE criteria for the class passed
|
Company |
getCurrentBusUnit(java.lang.String... args) |
java.lang.String |
getCurrentReason(java.lang.String... args) |
DBRelease |
getCurrentRelease(java.lang.String... args) |
Session |
getCurrentSession()
The current session for the login
|
java.util.TimeZone |
getCurrentTimeZone()
The current timezone for this login
|
DBLanguage |
getDefaultLanguage(java.lang.String... args) |
DBCriteria |
getDeleteCriteria(DBClassConcrete cls)
The DELETE criteria for the class passed
|
static java.lang.String |
getDigestPart(java.lang.String name,
java.lang.String header)
Authorization: Digest username="Mufasa",
realm="testrealm@host.com",
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
uri="/dir/index.html",
qop=auth,
nc=00000001,
cnonce="0a4f113b",
response="6629fae49393a05397450978507c4ef1",
opaque="5ccc069c403ebaf9f0171e9517f40e41"
|
java.util.Date |
getExpiry(java.lang.String... args) |
int |
getFailedAttempts(java.lang.String... args) |
java.lang.String |
getIgnoreWordList(java.lang.String... args) |
java.lang.String |
getJobProgressRefreshDuration(java.lang.String... args) |
java.util.Date |
getLastActive(java.lang.String... args) |
java.util.Date |
getLastChanged(java.lang.String... args) |
java.lang.String |
getLoginId(java.lang.String... args) |
DBTriStateOption |
getMfaCodeVerification(java.lang.String... args) |
DBTriStateOption |
getMfaVerifyNewBrowser(java.lang.String... args) |
DBCriteria |
getModifyCriteria(DBClassConcrete cls)
The MODIFY criteria for the class passed
|
java.lang.String |
getOutgoingEmailServer()
The email server.
|
java.lang.String |
getOutgoingMailPassword(java.lang.String... args) |
java.lang.String |
getOutgoingMailServer(java.lang.String... args) |
java.lang.String |
getOutgoingMailUser(java.lang.String... args) |
java.lang.String |
getPassword(java.lang.String... args) |
Person |
getPerson(java.lang.String... args) |
java.lang.String |
getPersonId()
The person id for this login.
|
DBCriteria |
getReadCriteria(DBClassConcrete cls)
The READ criteria for the class passed
|
protected java.lang.String |
getRealPassword() |
DBPasswordStorage |
getRequiredStorageAlgorithm(java.lang.String... args) |
java.lang.String |
getSalt(java.lang.String... args) |
java.lang.String |
getSha1Password(java.lang.String... args)
Deprecated.
|
java.lang.String |
getSsoDomain(java.lang.String... args) |
java.lang.String |
getSsoMode(java.lang.String... args) |
DBPasswordStorage |
getStorageAlgorithm(java.lang.String... args) |
DBPasswordStorage |
getStorageAlgorithmCalculated(java.lang.String... args) |
DBTimeZone |
getTimeZone(java.lang.String... args) |
boolean |
hasExpired(java.lang.String... args) |
boolean |
isDBAdmin()
Does this user have rights to access administration functions
on the current layer
|
boolean |
isDisabled(java.lang.String... args) |
boolean |
isFinalFg(java.lang.String... args) |
boolean |
isForceBrowserCompression(java.lang.String... args) |
boolean |
isForceExpire(java.lang.String... args) |
boolean |
isFunctional(java.lang.String... args) |
boolean |
isGuest()
is a guest ?
|
boolean |
isInactive(java.lang.String... args) |
boolean |
isInactivePeriodExpiried(java.lang.String... args) |
boolean |
isNeverExpires(java.lang.String... args) |
boolean |
isPasswordOk(java.lang.String checkPassword)
is the passed password correct ?
|
boolean |
isShouldShowTabBar(java.lang.String... args) |
boolean |
isSysAdmin()
Does this user have rights to access system wide administration functions
such as stats
|
boolean |
isSystem()
Is this a "system" login
|
boolean |
isSystemOrGuest()
is this a system or guest login
|
boolean |
isUser() |
static java.lang.String |
makeCheckURL(VirtualDB layer,
java.lang.String callBack) |
static java.util.UUID |
makeDeviceVerification(java.lang.String username,
java.lang.String signature) |
static LoginContext |
makeLoginContext(VirtualDB layer,
java.lang.String login,
java.lang.String clientTimeZoneOffset,
java.lang.String clientTimeZoneName,
java.lang.String javaVersion,
java.lang.String language,
java.lang.String authorization,
java.lang.String requestType,
boolean rememberMe,
java.lang.String sessionType,
java.lang.String authorizationCode,
int screenWidth,
int screenHeight)
Creates a new instance of LoginContext.
|
protected PasswordHandler |
makePasswordHandler() |
static java.lang.String |
makeProtectedURL(VirtualDB layer)
make the protected URL
|
static DBQuery<Login> |
makeQuery(DataSource ds)
Make a new QUERY for this class.
|
java.lang.String |
readPasswordValue()
Read the SALT & SHA512 value for this record.
|
java.lang.String |
readSalt()
Read the SALT for this record.
|
static void |
recordFailedLogin(Login login,
DBServer server,
java.lang.String category,
VirtualDB db)
creates DBFailedLogin.
|
Login |
setAccessGroup(com.aspc.dal.dbobj.acl.AccessGroup value,
java.lang.String... args) |
Login |
setActivationMagicNumber(com.aspc.dal.magic.DBMagicNumber value,
java.lang.String... args) |
Login |
setBatchNumber(int value,
java.lang.String... args) |
Login |
setCurrentBusUnit(com.aspc.dal.dbobj.contact.Business value,
java.lang.String... args) |
Login |
setCurrentReason(java.lang.String value,
java.lang.String... args) |
Login |
setCurrentRelease(com.aspc.dal.dbobj.misc.DBRelease value,
java.lang.String... args) |
Login |
setCurrentSession(com.aspc.dal.dbobj.contact.Session value,
java.lang.String... args) |
Login |
setDefaultLanguage(com.aspc.dal.dbobj.language.DBLanguage value,
java.lang.String... args) |
Login |
setDisabled(boolean value,
java.lang.String... args) |
Login |
setFailedAttempts(int value,
java.lang.String... args) |
Login |
setFinalFg(boolean value,
java.lang.String... args) |
Login |
setForceBrowserCompression(boolean value,
java.lang.String... args) |
Login |
setForceExpire(boolean value,
java.lang.String... args) |
Login |
setFunctional(boolean value,
java.lang.String... args) |
Login |
setIgnoreWordList(java.lang.String value,
java.lang.String... args) |
Login |
setInactive(boolean value,
java.lang.String... args) |
Login |
setJobProgressRefreshDuration(java.lang.String value,
java.lang.String... args) |
Login |
setLastActive(java.util.Date value,
java.lang.String... args) |
Login |
setLastChanged(java.util.Date value,
java.lang.String... args) |
Login |
setLoginId(java.lang.String value,
java.lang.String... args) |
Login |
setMfaCodeVerification(com.aspc.dal.dbobj.misc.DBTriStateOption value,
java.lang.String... args) |
Login |
setMfaVerifyNewBrowser(com.aspc.dal.dbobj.misc.DBTriStateOption value,
java.lang.String... args) |
Login |
setNeverExpires(boolean value,
java.lang.String... args) |
Login |
setOutgoingMailPassword(java.lang.String value,
java.lang.String... args) |
Login |
setOutgoingMailServer(java.lang.String value,
java.lang.String... args) |
Login |
setOutgoingMailUser(java.lang.String value,
java.lang.String... args) |
Login |
setPassword(java.lang.String value,
java.lang.String... args) |
Login |
setPersonId(com.aspc.dal.dbobj.contact.Person value,
java.lang.String... args) |
Login |
setRequiredStorageAlgorithm(com.aspc.dal.password.DBPasswordStorage value,
java.lang.String... args) |
Login |
setSalt(java.lang.String value,
java.lang.String... args) |
Login |
setSha1Password(java.lang.String value,
java.lang.String... args)
Deprecated.
|
Login |
setShowWelcomePage(boolean value,
java.lang.String... args) |
Login |
setSsoDomain(java.lang.String value,
java.lang.String... args) |
Login |
setSsoMode(java.lang.String value,
java.lang.String... args) |
Login |
setStorageAlgorithm(com.aspc.dal.password.DBPasswordStorage value,
java.lang.String... args) |
Login |
setTimeZone(com.aspc.dal.dbobj.misc.TimeZone value,
java.lang.String... args) |
boolean |
showWelcomePage(java.lang.String... args) |
static java.lang.String |
splitURL(java.lang.String URLs)
Split the URLs
|
java.lang.String |
ssoMode()
is SSO enabled for this user
|
static java.lang.String |
ssoMode(VirtualDB layer,
java.lang.String userModeSSO)
Is SSO enabled ?
If disabled at the
Signal Sign On modes
1) TRANSPARENT - only transparent login
2) HYBRID - Transparent or database password.
|
boolean |
validDigest(java.lang.String method,
java.lang.String authorization)
http://en.wikipedia.org/wiki/Digest_access_authentication
Authorization: Digest username="Mufasa",
realm="testrealm@host.com",
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
uri="/dir/index.html",
qop=auth,
nc=00000001,
cnonce="0a4f113b",
response="6629fae49393a05397450978507c4ef1",
opaque="5ccc069c403ebaf9f0171e9517f40e41"
HA1 = MD5( "Mufasa:testrealm@host.com:Circle Of Life" ) = 939e7578ed9e3c518a452acee763bce9
HA2 = MD5( "GET:/dir/index.html" ) = 39aff3a2bab6126f332b942af96d3366
Response = MD5( "939e7578ed9e3c518a452acee763bce9:\
dcd98b7102dd2f0e8b11d0f600bfb0c093:\
00000001:0a4f113b:auth:\
39aff3a2bab6126f332b942af96d3366" )
= 6629fae49393a05397450978507c4ef1
|
protected void |
vetoSession(Session session)
veto a session
|
void |
writePasswordValue(java.lang.String value)
Write the SALT & SHA512 value for this record.
|
void |
writeSalt(java.lang.String salt)
Write the generated SALT
|
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, clearCache, copy, copyFields, copyIncludeField, copyInwardLinks, delete, denormalizedResult, displayLogName, displayValue, doSearch, dump, equals, extAutoEnterCreate, extCanDeleteDependantObject, extCheckCreateAccess, extCheckReadAccess, extCopy, extDelete, extDeleteRecord, extIsMandatory, extIsOnChange, extMarkSavePoint, extPostDeleteRecord, extPostSaveRecord, extPreDeleteRecord, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extUndelete, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeSearchPlan, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, touch, undelete, validateField, validateRecord, validateSubType
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
registerWatchedObject
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
public static final java.lang.String PASSWORD_HANDLER
public static final java.lang.String DIGEST_REALM
public static final java.lang.String REALM
public static final java.lang.String MODE_HYBRID
public static final java.lang.String MODE_TRANSPARENT
public static final java.lang.String PASSWORD_RESTRICTION_BYPASS
public static final java.lang.String LOGIN_GUEST
public static java.lang.String DEVICE_VERIFICATION_UUID
public Login(DBClass def, DataSource dataSource) throws java.lang.Exception
def
- The class of this objectdataSource
- The datasource for this objectjava.lang.Exception
- A serious problem occurred@CheckReturnValue @Nonnull public java.lang.String getLoginId(java.lang.String... args)
@Nonnull public Login setLoginId(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull public Login setAccessGroup(com.aspc.dal.dbobj.acl.AccessGroup value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBMagicNumber getActivationMagicNumber(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBMagicNumber findActivationMagicNumber(java.lang.String... args) throws NotFoundException
DBMagicNumber
(String,
Unique, Searchable)args
- the optional argumentsNotFoundException
- DBMagicNumber was not found@Nonnull public Login setActivationMagicNumber(com.aspc.dal.magic.DBMagicNumber value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getBatchNumber(java.lang.String... args)
@Nonnull public Login setBatchNumber(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean canCreateLogins(java.lang.String... args)
@CheckReturnValue @Nullable public Company getCurrentBusUnit(java.lang.String... args)
@CheckReturnValue @Nonnull public final Company findCurrentBusUnit(java.lang.String... args) throws NotFoundException
Business
(Integer,
Searchable)args
- the optional argumentsNotFoundException
- Business was not found@Nonnull public Login setCurrentBusUnit(com.aspc.dal.dbobj.contact.Business value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getCurrentReason(java.lang.String... args)
@Nonnull public Login setCurrentReason(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBRelease getCurrentRelease(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBRelease findCurrentRelease(java.lang.String... args) throws NotFoundException
DBRelease
(String,
Searchable)args
- the optional argumentsNotFoundException
- DBRelease was not found@Nonnull public Login setCurrentRelease(com.aspc.dal.dbobj.misc.DBRelease value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull public Login setCurrentSession(com.aspc.dal.dbobj.contact.Session value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBLanguage getDefaultLanguage(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBLanguage findDefaultLanguage(java.lang.String... args) throws NotFoundException
DBLanguage
(String,
Searchable)args
- the optional argumentsNotFoundException
- DBLanguage was not found@Nonnull public Login setDefaultLanguage(com.aspc.dal.dbobj.language.DBLanguage value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isDisabled(java.lang.String... args)
@Nonnull public Login setDisabled(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getExpiry(java.lang.String... args)
@CheckReturnValue public int getFailedAttempts(java.lang.String... args)
@Nonnull public Login setFailedAttempts(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isFinalFg(java.lang.String... args)
@Nonnull public Login setFinalFg(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isForceBrowserCompression(java.lang.String... args)
@Nonnull public Login setForceBrowserCompression(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isForceExpire(java.lang.String... args)
@Nonnull public Login setForceExpire(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isFunctional(java.lang.String... args)
@Nonnull public Login setFunctional(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean hasExpired(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getIgnoreWordList(java.lang.String... args)
@Nonnull public Login setIgnoreWordList(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isInactive(java.lang.String... args)
@Nonnull public Login setInactive(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isInactivePeriodExpiried(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getJobProgressRefreshDuration(java.lang.String... args)
@Nonnull public Login setJobProgressRefreshDuration(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getLastActive(java.lang.String... args)
@Nonnull public Login setLastActive(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public java.util.Date getLastChanged(java.lang.String... args)
@Nonnull public Login setLastChanged(java.util.Date value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBTriStateOption getMfaCodeVerification(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBTriStateOption findMfaCodeVerification(java.lang.String... args) throws NotFoundException
DBTriStateOption
(String, Searchable)args
- the optional argumentsNotFoundException
- DBTriStateOption was not found@Nonnull public Login setMfaCodeVerification(com.aspc.dal.dbobj.misc.DBTriStateOption value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBTriStateOption getMfaVerifyNewBrowser(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBTriStateOption findMfaVerifyNewBrowser(java.lang.String... args) throws NotFoundException
DBTriStateOption
(String, Searchable)args
- the optional argumentsNotFoundException
- DBTriStateOption was not found@Nonnull public Login setMfaVerifyNewBrowser(com.aspc.dal.dbobj.misc.DBTriStateOption value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isNeverExpires(java.lang.String... args)
@Nonnull public Login setNeverExpires(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getOutgoingMailPassword(java.lang.String... args)
@Nonnull public Login setOutgoingMailPassword(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getOutgoingMailServer(java.lang.String... args)
@Nonnull public Login setOutgoingMailServer(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getOutgoingMailUser(java.lang.String... args)
@Nonnull public Login setOutgoingMailUser(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getPassword(java.lang.String... args)
@Nonnull public Login setPassword(@MatchesPattern(value="([a-zA-Z0-9#$!%\\(\\)\\+,\\./<=>@\\[\\]\\^_\\{\\|\\}~]+|.{8,})") java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull public Login setPersonId(com.aspc.dal.dbobj.contact.Person value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBPasswordStorage getRequiredStorageAlgorithm(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBPasswordStorage findRequiredStorageAlgorithm(java.lang.String... args) throws NotFoundException
DBPasswordStorage
(String, Searchable)args
- the optional argumentsNotFoundException
- DBPasswordStorage was not found@Nonnull public Login setRequiredStorageAlgorithm(com.aspc.dal.password.DBPasswordStorage value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSalt(java.lang.String... args)
@Nonnull public Login setSalt(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Deprecated @CheckReturnValue @Nonnull public java.lang.String getSha1Password(java.lang.String... args)
@Deprecated @Nonnull public Login setSha1Password(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isShouldShowTabBar(java.lang.String... args)
@CheckReturnValue public boolean showWelcomePage(java.lang.String... args)
@Nonnull public Login setShowWelcomePage(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSsoDomain(java.lang.String... args)
@Nonnull public Login setSsoDomain(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getSsoMode(java.lang.String... args)
@Nonnull public Login setSsoMode(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBPasswordStorage getStorageAlgorithm(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBPasswordStorage findStorageAlgorithm(java.lang.String... args) throws NotFoundException
DBPasswordStorage
(String, Searchable)args
- the optional argumentsNotFoundException
- DBPasswordStorage was not found@Nonnull public Login setStorageAlgorithm(com.aspc.dal.password.DBPasswordStorage value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBPasswordStorage getStorageAlgorithmCalculated(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBPasswordStorage findStorageAlgorithmCalculated(java.lang.String... args) throws NotFoundException
DBPasswordStorage
(String, Derived, Searchable)args
- the optional argumentsNotFoundException
- DBPasswordStorage was not found@CheckReturnValue @Nullable public DBTimeZone getTimeZone(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBTimeZone findTimeZone(java.lang.String... args) throws NotFoundException
TimeZone
(String,
Searchable)args
- the optional argumentsNotFoundException
- TimeZone was not found@Nonnull public Login setTimeZone(com.aspc.dal.dbobj.misc.TimeZone value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Nonnull @CheckReturnValue public static Login create(@Nonnull MutableDataSource mds) throws java.lang.Exception
mds
- the datasourcejava.lang.Exception
- an object of this class could not be created@Nonnull @CheckReturnValue public static DBQuery<Login> makeQuery(@Nonnull DataSource ds) throws NotFoundException
ds
- the datasourceNotFoundException
- if class could not be found@Nonnull @CheckReturnValue public static Login findKey(@Nonnull DataSource ds, @Nonnull java.lang.String key) throws NotFoundException, java.lang.Exception
ds
- the datasourcekey
- the valueNotFoundException
- if target could not be foundjava.lang.Exception
- a serious problem@CheckReturnValue @Nonnull public java.lang.String displayName()
displayName
in class DBObject
@CheckReturnValue @Nonnull public static java.util.UUID makeDeviceVerification(@Nonnull java.lang.String username, @Nonnull java.lang.String signature)
@Nonnull @CheckReturnValue public java.lang.String getPersonId()
public void eventReload(@Nonnull DBObject obj)
eventReload
in interface ReloadEventListener
obj
- The object that was reloaded.@CheckReturnValue public final boolean isSystem()
@CheckReturnValue public final boolean isSystemOrGuest()
@CheckReturnValue public final boolean isGuest()
@CheckReturnValue public boolean isUser()
@CheckReturnValue public boolean isPasswordOk(@Nonnull java.lang.String checkPassword) throws java.lang.Exception
checkPassword
- The password to checkjava.lang.Exception
- a serious problemprotected PasswordHandler makePasswordHandler() throws java.lang.Exception
java.lang.Exception
@Nonnull @CheckReturnValue public java.lang.String ssoMode() throws java.lang.Exception
java.lang.Exception
- a serious problem.@Nonnull @CheckReturnValue public static java.lang.String ssoMode(@Nonnull VirtualDB layer, @Nullable java.lang.String userModeSSO) throws java.lang.Exception
layer
- the layeruserModeSSO
- user wants to enable SSOjava.lang.Exception
- a serious problem.@Nonnull @CheckReturnValue public static java.lang.String makeProtectedURL(@Nonnull VirtualDB layer) throws java.lang.Exception
layer
- the layerjava.lang.Exception
- a serious problem@Nullable @CheckReturnValue public static java.lang.String splitURL(java.lang.String URLs)
URLs
- the URLs@Nonnull @CheckReturnValue public static java.lang.String makeCheckURL(@Nonnull VirtualDB layer, @Nonnull java.lang.String callBack) throws java.lang.Exception
layer
- the layercallBack
- the call backjava.lang.Exception
- a serious problem@Nonnull @CheckReturnValue protected final java.lang.String getRealPassword()
@CheckReturnValue public boolean canCreateRecord(@Nonnull DBClassConcrete dbClass) throws java.lang.Exception
dbClass
- The class to checkjava.lang.Exception
- a serious problem@CheckReturnValue public boolean canModifyRecords(@Nonnull DBClassConcrete dbClass) throws java.lang.Exception
dbClass
- the class to checkjava.lang.Exception
- a serious problem@CheckReturnValue public boolean canDeleteRecords(@Nonnull DBClassConcrete dbClass) throws java.lang.Exception
dbClass
- the class to checkjava.lang.Exception
- a serious problem@CheckReturnValue public boolean canReadRecords(@Nonnull DBClassConcrete dbClass) throws java.lang.Exception
dbClass
- the class to checkjava.lang.Exception
- a serious problem@Nonnull @CheckReturnValue public static LoginContext makeLoginContext(VirtualDB layer, java.lang.String login, java.lang.String clientTimeZoneOffset, java.lang.String clientTimeZoneName, java.lang.String javaVersion, java.lang.String language, java.lang.String authorization, java.lang.String requestType, boolean rememberMe, java.lang.String sessionType, java.lang.String authorizationCode, int screenWidth, int screenHeight) throws java.lang.Exception
layer
- the layerlogin
- the loginclientTimeZoneOffset
- time zone offsetclientTimeZoneName
- time zone namejavaVersion
- JDK versionlanguage
- user languageauthorization
- the authorizationrequestType
- the request typerememberMe
- remember mesessionType
- the typeauthorizationCode
- the codescreenWidth
- the screen widthscreenHeight
- the screen heightjava.lang.Exception
- a serious problem.@Nonnull @CheckReturnValue public AccessGroup getAccessGroup()
@CheckReturnValue @Nonnull public java.lang.String getOutgoingEmailServer()
@Nullable @CheckReturnValue public Session getCurrentSession()
@Nonnull @CheckReturnValue public java.util.TimeZone getCurrentTimeZone()
@Nonnull @CheckReturnValue public Session createRemoteSession(java.lang.String password, LoginContext loginContext, java.lang.String remoteHost) throws java.lang.Exception
loginContext
- The login contextremoteHost
- The remote hostpassword
- The password to checkjava.lang.Exception
- The login details are not valid.@Nonnull @CheckReturnValue public Session createWebSession(java.lang.String password, LoginContext loginContext, java.lang.String agent, java.lang.String host, java.lang.String clientURL) throws java.lang.Exception
loginContext
- the login contextpassword
- The password to checkagent
- The web agent usedhost
- The host that is being usedclientURL
- The location of the user.java.lang.Exception
- The login details are not valid@Nonnull @CheckReturnValue public Session createWebSession(java.lang.String password, LoginContext loginContext, java.lang.String agent, java.lang.String host, java.lang.String clientURL, boolean useMagicNumber) throws java.lang.Exception
loginContext
- the login contextpassword
- The password to checkagent
- The web agent usedhost
- The host that is being usedclientURL
- The location of the user.useMagicNumber
- using magic numberjava.lang.Exception
- The login details are not validprotected void vetoSession(@Nonnull Session session) throws InvalidPasswordException
session
- the session to checkInvalidPasswordException
- no allowed to login@Nullable public static Session activateWebSession(@Nullable Session session, boolean makeCurrentSession) throws java.lang.Exception
session
- the sessionmakeCurrentSession
- make this session the current sessionjava.lang.Exception
- a serious problem@CheckReturnValue public boolean validDigest(java.lang.String method, @Nullable java.lang.String authorization)
method
- the methodauthorization
- the authorization to check.@Nonnull @CheckReturnValue public static java.lang.String getDigestPart(@Nonnull java.lang.String name, @Nullable java.lang.String header)
name
- the component nameheader
- the headerpublic static void recordFailedLogin(@Nonnull Login login, DBServer server, java.lang.String category, VirtualDB db) throws java.lang.Exception
login
- the loginserver
- The DBServercategory
- the reasondb
- the layerjava.lang.Exception
- a serious problem@Nullable @CheckReturnValue public static java.lang.String checkPassword(@Nonnull VirtualDB layer, @Nullable java.lang.String password) throws java.lang.Exception
layer
- The layerpassword
- The password to checkjava.lang.Exception
- a serious problem@Nonnull @CheckReturnValue public DBCriteria getReadCriteria(@Nonnull DBClassConcrete cls) throws java.lang.Exception
cls
- The class to checkjava.lang.Exception
- A serious problem@Nonnull @CheckReturnValue public DBCriteria getModifyCriteria(@Nonnull DBClassConcrete cls) throws java.lang.Exception
cls
- The class to checkjava.lang.Exception
- A serious problem@Nonnull @CheckReturnValue public DBCriteria getCreateCriteria(@Nonnull DBClassConcrete cls) throws java.lang.Exception
cls
- The class to checkjava.lang.Exception
- A serious problem@Nonnull @CheckReturnValue public DBCriteria getDeleteCriteria(@Nonnull DBClassConcrete cls) throws java.lang.Exception
cls
- The class to checkjava.lang.Exception
- A serious problem@CheckReturnValue public boolean isSysAdmin()
@CheckReturnValue public boolean isDBAdmin()
@Nonnull @CheckReturnValue public static Login findLogin(@Nullable java.lang.String signature, @Nullable java.lang.String userName) throws java.lang.Exception
signature
- The layer signatureuserName
- The user name to findjava.lang.Exception
- A serious problem@Nonnull @CheckReturnValue public Login getBaseLogin()
@Nullable @CheckReturnValue public static GlobalKey findSingleKey(VirtualDB layer, java.lang.String usernameOrEmail) throws java.lang.Exception
java.lang.Exception
protected void extSetValue(DBField field, java.lang.Object orgValue, FldParams params) throws java.lang.Exception
extSetValue
in class DBObject
orgValue
- The value being set.field
- The field that is being changedparams
- The extra parametersjava.lang.Exception
- A serious problem@CheckReturnValue protected java.lang.Object extGetDerivedValue(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
extGetDerivedValue
in class DBObject
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- A serious problem@Nullable @CheckReturnValue protected GlobalKey extGetDerivedGlobalKey(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
DBObject
extGetDerivedGlobalKey
in class DBObject
field
- The field that is being changedparams
- The extra parametersjava.lang.Exception
- A serious problem. In general validation is done later.@OverridingMethodsMustInvokeSuper protected void extFixUp() throws java.lang.Exception
@OverridingMethodsMustInvokeSuper protected void extCheckModifyAccess() throws DBAccessException
extCheckModifyAccess
in class DBObject
DBAccessException
- No access to modify@OverridingMethodsMustInvokeSuper protected void extCheckModifyAccess(@Nonnull DBField field) throws DBAccessException
extCheckModifyAccess
in class DBObject
field
- Can we change this field ?DBAccessException
- No access to change@OverridingMethodsMustInvokeSuper protected void extCheckDeleteAccess() throws DBAccessException
extCheckDeleteAccess
in class DBObject
DBAccessException
- No access to delete this object@OverridingMethodsMustInvokeSuper protected void extPreValidate() throws java.lang.Exception
extPreValidate
in class DBObject
java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void eventDataLoaded()
eventDataLoaded
in class DBObject
protected void eventFieldUpdated(DBField field, java.lang.Object previous, GlobalKey previousKey, FldParams params) throws java.lang.Exception
eventFieldUpdated
in class DBObject
field
- The field changedprevious
- The previous valuepreviousKey
- the previous keyparams
- the field parameters usedjava.lang.Exception
- a serious problem@CheckReturnValue @Nullable protected java.lang.Object extGetValue(@Nullable DBField field, @Nullable FldParams params)
extGetValue
in class DBObject
field
- The field to getparams
- The parameters for this field eg. language= or default=@OverridingMethodsMustInvokeSuper protected void extValidateRecord(@Nonnull ValidationList list) throws java.lang.Exception
extValidateRecord
in class DBObject
list
- The validation list.java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extValidateDelete(@Nonnull ValidationList list) throws java.lang.Exception
extValidateDelete
in class DBObject
list
- The validation listjava.lang.Exception
- A serious problemDBObject.extValidateDelete( ValidationList)
protected void checkAtLeastOneOwner() throws java.lang.Exception
java.lang.Exception
- no owner.@CheckReturnValue @OverridingMethodsMustInvokeSuper @Nullable protected ValidationError extValidateField(@Nonnull DBField field, @Nonnull ValidationList list) throws java.lang.Exception
extValidateField
in class DBObject
field
- The field to validatelist
- The validation listjava.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extPreSaveRecord() throws java.lang.Exception
DBObject
extPreSaveRecord
in class DBObject
java.lang.Exception
- a serious problem@CheckReturnValue public int generateNextBatch() throws java.lang.Exception
java.lang.Exception
- a serious problem@CheckReturnValue @Nullable public Person getPerson(java.lang.String... args)
@CheckReturnValue @Nonnull public final Person findPerson(java.lang.String... args) throws NotFoundException
args
- the optional argumentsNotFoundException
- DBLanguage was not found@Nonnull @CheckReturnValue public java.lang.String readSalt()
PasswordRecord
readSalt
in interface PasswordRecord
public void writeSalt(java.lang.String salt) throws java.lang.Exception
PasswordRecord
writeSalt
in interface PasswordRecord
salt
- the SALT.java.lang.Exception
- a serious problem.public java.lang.String readPasswordValue()
PasswordRecord
readPasswordValue
in interface PasswordRecord
public void writePasswordValue(java.lang.String value) throws java.lang.Exception
PasswordRecord
writePasswordValue
in interface PasswordRecord
value
- the value to store.java.lang.Exception
- a serious problemstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.