<cflogin>
A container for user login and authentication code.
Lucee runs the code in this tag if a user is not already logged in.
You put code in the tag that authenticates the user and identifies the user with a set of roles. Used with <cfloginuser> tag.
This tag must have a body.
This tag is also supported within <cfscript>
<cflogin
idleTimeout=number
applicationToken=string
cookieDomain=string
><!--- body ---></cflogin>
| Attribute | Description |
|---|
Unimplemented Attribute(s)
| Attribute | Description |
|---|---|
idleTimeout
number,
optional
|
edit
Time interval, in seconds, after which Lucee logs off the user. * unimplemented * |
applicationToken
string,
optional
|
edit
The login that applies to the application. To let users log in to only one application, specify a unique value for that application. To let users log in to multiple applications, specify the same value for those applications. If you do not set a value for the applicationtoken attribute, the default value is CFAUTHORIZATION_applicationname. * unimplemented * |
cookieDomain
string,
optional
|
edit
Domain of the cookie that is used to mark a user as logged in. Use this attribute to enable a user login cookie to work with multiple clustered servers in the same domain. * unimplemented * |
Examples
edit<cflogin>
<cfloginuser name = "test" password = "password" roles = "user,admin,editor">
</cflogin>
<cfdump var="#getUserRoles()#" />
Related System Properties / Environment Variables
- LUCEE_LOGINSTORAGE_ITERATIONS - Specifies the number of encryption iterations for loginstorage
Type: numeric, Default: false - LUCEE_LOGINSTORAGE_PRIVATEKEY - A private key used to encrypt loginstorage. If not defined, a simple base64 encoding is used
Type: string - LUCEE_LOGINSTORAGE_SALT - The salt used for encrypting loginstorage. If no salt is defined, a hardcoded salt is used
Type: string
See also
- GetAuthUser()
- GetUserRoles()
- IsUserInAnyRole()
- IsUserInRole()
- IsUserLoggedIn()
- <cfloginuser>
- <cflogout>
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)