Identifies an authenticated user to CFML. Specifies the user ID and roles. Used within a cflogin tag.
<cfloginuser name="" password="" roles="">
cfloginuser(name="", password="", roles="");
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | Yes | A username. | |
| password | string | Yes | A user password. | |
| roles | string | Yes | A comma-delimited list of role identifiers. CFML processes spaces in a list element as part of the element. |
The following example shows a simple authentication:
cflogin(idletimeout=3600, applicationtoken='YOUR_APP_NAME', cookiedomain='YOUR_DOMAIN_NAME') {
cfoauth(
type="Google",
clientid="YOUR_CLIENT_ID",
secretkey="YOUR_GOOGLE_CLIENTSECRET",
redirecturi="YOUR_CALLBACK_URI",
result="res",
scope="YOUR_SCOPES",
state="cftoken=#cftoken#"
);
cfloginuser(name="#res.other.email#", password="#res.access_token#", roles="user");
}