Skip to main content
Version: 4.32.x.x LTS

UseridPasswordFileTestState

Introduction and overview

This AuthState should not be used in production. Its sole purpose is to test and demonstrate functionality.

This AuthState is a very simple user registry for user ID/password logins for testing.

Description

The following table describes the characteristics of the AuthState.

TopicDescription
Classch.nevis.esauth.auth.states.standard.UseridPasswordFileTestState
LoggingStdStates
Auditingnone
Markerfile:username/password
PropertiesUseridPasswordFile (string)This property should point to a Java property file, containing the user accounts. The file must be readable for the process owner of the nevisAuth instance.
Methodsauthenticate
Inputisiwebuserid (user, required): login ID (and at the same time the user ID) of the user to authenticate
isiwebpasswd (user, required): password
Transitionsok: User was authenticated.
default: User not found or pass-phrase not valid.
Outputnone
Errors1: unknown user; invalid password
Notesnone

Example

<AuthState name="SimpleLogin" class="ch.nevis.esauth.auth.states.standard.UseridPasswordFileTestState">
<ResultCond name="ok" next="AuthDone"/>
<Response value="AUTH_CONTINUE">
<Gui name="AuthUidPwDialog" label="login.uidpw.label">
<GuiElem name="lasterror" type="error" label="${notes:lasterrorinfo}" value="${notes:lasterror}"/>
<GuiElem name="info" type="info" label="login.uidpw.text"/>
<GuiElem name="isiwebuserid" type="text" label="userid.label" value="${request:loginId}"/>
<GuiElem name="isiwebpasswd" type="pw-text" label="password.label"/>
<GuiElem name="submit" type="button" label="submit.button.label" value="Login"/>
</Gui>
</Response>
<property name="UseridPasswordFile" value="conf/passwd.properties"/>
</AuthState>

For testing, you can also use the ch.nevis.esauth.auth.engine.UidPwLoginTest AuthState (see default configuration for details). This AuthState allows a login with any login ID and a password with the same value.