loginCustomer(String, String, int, int, String, long, String, boolean, List< String >) method

Syntax

CustomerSession loginCustomer ( String identifier , String plainTextCredential , int identifierType , int credentialType , String origin , long callerId , String orgUnit , boolean allPrivilegesRequired , List< String > requiredPrivileges ) throws EntityNotFoundException, CustomerStatusException, CredentialValidationException, SessionException, InternalCustomerException, MissingLoginPrivilegeException

Parameters

Returns

the created CustomerSession

Exceptions

Usage

Logs in an end-user into an application by checking username, credential, and creating a new session. This method runs in its

own transaction

to make sure that wrong credential checks are persisted. The session id that is returned should be used for each subsequent request and is valid either until it times out or a logout is called.

In case of an incorrect credential the Credential Policies are used to determine the next action. In case the credential was correct but it is temporary (system generated) or has expired the

CredentialOkButExpiredException

is thrown.

the created CustomerSession