new UWA.Services.Auth.Adapter.Form(options)
This Adapter class is made to support Auth via Form.
Example
var myAuthForm = new UWA.Services.Auth({
adapter: 'Form',
adapterOptions: {
checkUrl: 'https://apps.example.com/myapp/test.json',
loginUrl: 'https://apps.example.com/global/2.0/login.fcc',
logoutUrl: 'https://apps.example.com/global/2.0/logout.fcc',
checkTimeout: 15000,
loginTimeout: 15000,
variables: {
realmoid: '123...',
type: '123...',
forest: 'dc=uwa,dc=com',
smauthreason: '',
smagentname: 'abc...'
},
params: {
type: '123...',
realmoid: '{realmoid}',
guid: '',
smauthreason: '0',
method: 'GET',
smagentname: '-SM-{smagentname}',
target: '-SM-{target}'
},
fields: {
userid: '{login}',
password: '{password}',
target: '{checkUrl}',
smauthreason: '{smauthreason}',
smagentname: '{smagentname}',
forest: '{forest}',
smquerydata: '',
postpreservationdata: '',
Submit: ''
}
}
});
Parameters
Name | Type | Description |
---|---|---|
options |
Object | Options hash or a option/value pair. |
Extends
- UWA.Services.Auth.Adapter.Abstract
Index
Methods
Methods
-
isAjaxPostAllowed()
-
Check if Environment support Ajax POST method instead of Frame POST.
-
hasIdentity(onSuccess, onFailure)
-
Check if user has an Identity.
Parameters
Name Type Description onSuccess
Function On success callback
onFailure
Function On failure callback
-
getIdentity(onSuccess, onFailure)
-
Get user Identity.
Parameters
Name Type Description onSuccess
Function On success callback
onFailure
Function On failure callback
Returns: * Nothing.
-
clearIdentity(onComplete)
-
Clears the current identity.
Parameters
Name Type Description onComplete
Function On success callback
-
authenticate(onSuccess, onFailure, credentials)
-
Authenticate user.
Parameters
Name Type Description onSuccess
Function On success callback
onFailure
Function On failure callback
credentials
Object Auth adapter credentials
-
authenticateUsingFrame(fields, loginUrl, onComplete)
-
Authenticate user using Frame.
Parameters
Name Type Description fields
Object Frame query params
loginUrl
String Frame query url
onComplete
Function On complete callback
-
clearIdentityUsingFrame(onComplete)
-
Clears the current identity using Frame.
Parameters
Name Type Description onComplete
Function On complete callback
-
authenticateUsingAjax(fields, siteminderUrl, onComplete)
-
Authenticate user using Ajax.
Parameters
Name Type Description fields
Object Ajax query params
siteminderUrl
String Ajax query url
onComplete
Function On complete callback
-
clearIdentityUsingAjax(onComplete)
-
Clears the current identity using Ajax.
Parameters
Name Type Description onComplete
Function On complete callback