Creates a new AuthSession and returns the login form to the caller in the form of two variables:
Header content is text for the site to output in the header, and body content is text to output in the page body where the login form to be situated.
If the 'siteuser' iCM maintenance area is online but is scheduled to go offline in the future then this method will return a user friendly message informing the user that site logins will be disabled from that time. This message is output by the loginform/body.hbs template.
If the 'siteuser' iCM maintenance area is offline this method will return a user friendly message informing the user that site logins are currently disabled. This message is output by the hbMaintenanceModeHeaderTemplate and hbMaintenanceModeBodyTemplate handlebar templates in the worker configuration.
Parameters
Name | Type | Description |
---|---|---|
returnUrl | String (URL), required | URL to return to after passing through the authentication system without an error Will have the 'as' (AuthSessionId) and 'asn' (AuthSessionNonce) query parameters appended to it |
errorReturnUrl | String (URL), required | URL to return to after an error within the authentication worker occurs Will have the 'as' (AuthSessionId) and 'asn' (AuthSessionNonce) query parameters appended to it |
baseAuthWorkerUrl | String (URL), required | Publicly accessible path to the Auth worker, eg http://mysite/apiserver/auth Used internally to build URLs to other endpoints, eg baseAuthWorkerUrl + "/http/reentry" |
fromEmailAddress | Object, required | A JSON object containing two non-null, non-empty string fields: "address" and "name" |
siteCClampUrl | String (URL), required | The site "C-Clamp" within which the various auth dialogues (for account linking etc) should be injected |
zoneId | Integer, optional | The ID of the zone requesting authentication. Either zoneId or subsiteId must be supplied |
subsiteId | Integer, optional | If the zoneId is not supplied the subsiteId is used to retrieve the zoneId from iCM |
loginFormType | String, optional | The type of login form to render, either Standard or formembedded. Default: Standard |
hbsContext | Map, optional | A map that can be supplied in a RenderLoginForm call, the contents of which is made available to the handlebars templates that render the login form. Typically this could be used to output extra data supplied by the site templates to the login form templates. It is also used when rendering the login dialogue in formembedded mode to supply the name of the form being rendered, as this must be prefixed to the name of the button(s) output for each provider |
providers | Array<String>, optional | Names of the providers to return, eg ["icmsiteuser","facebook"] If the name of a provider that is not available is sent, it will be ignored. If not supplied, all configured providers will be returned. |
namedTemplateOverrides | Array<String>, optional | Affects handlebars template resolution. |
siteUserGroupIds | Array<Long>, optional | Site groups that the iCM Site User created/updated by the authentication process should be added to. |
accountManagement | Boolean, optional | Set true to enable management mode (for account linking etc) |
managingUserId | Integer, optional | Required to enter account management mode. The ID of the user to manage |
asId | String, optional | Supply the current session ID when entering account management mode to prevent a new one form being generated |
Response Fields
Name | Type | Description |
---|---|---|
headerContent | String, required | Text for the caller to output in the page header. |
bodyContent | String, required | Text for the caller to output in the page body. |
Example Request
{
"id": 294,
"jsonrpc": "2.0",
"method": "renderLoginForm",
"params": {
"baseAuthWorkerUrl": "http://demodev1.gossinteractive.com/apiserver/auth/",
"errorReturnUrl": "http://demodev1.gossinteractive.com/testauthworker.cfm",
"returnUrl": "http://demodev1.gossinteractive.com/testauthworker.cfm",
"fromEmailAddress": "login@website.com",
"siteCClampUrl": "https://mywebsite/page",
"subsiteId": 1,
"fromEmailAddress": {
"address": "support@gossinteractive.com",
"name": "Tim"
}
}
}
Example Response
{
"id": 294,
"jsonrpc": "2.0",
"result": {
"result": {
"headerContent": "[...SNIP_HTML...]",
"bodyContent": "[...SNIP_HTML...]"
}
}
}