new UWA.Plugins.Auth(widget, options)
This Plugin add an Authentication form to your widget.
Examples
Using plugin in Widget Javascript:
<script type="text/javascript" src="http://uwa.netvibes.com/lib/c/UWA/js/UWA_Plugins_Auth.js"></script>
<script type="text/javascript" src="http://uwa.netvibes.com/lib/c/UWA/js/UWA_Services_Auth.js"></script>
<script type="text/javascript" src="http://uwa.netvibes.com/lib/c/UWA/js/UWA_Services_Auth_Adapter_Abstract.js"></script>
<script type="text/javascript" src="http://uwa.netvibes.com/lib/c/UWA/js/UWA_Services_Auth_Adapter_SiteMinder.js"></script>
<script type="text/javascript">
var MyPlugin = UWA.Plugins.Auth(widget, {
adapter: 'SiteMinder',
adapterOptions: {...},
formOptions: {...},
});
</script>
Using plugin in Widget Manifest:
<widget:plugins>
<widget:plugin name="Auth">
<widget:option name="adapter" value="SiteMinder" />
<widget:options name="adapterOptions">
<widget:option name="smagentname" value="abc..." />
<widget:option name="realmoid" value="123..." />
<widget:option name="type" value="123..." />
<widget:option name="forest" value="dc=uwa,dc=com" />
<widget:option name="target" value="https://apps.example.com/myapp/test.json" />
<widget:option name="login" value="https://apps.example.com/global/2.0/login.fcc" />
<widget:option name="logout" value="https://apps.example.com/global/2.0/logout.fcc" />
</widget:options>
<widget:options name="formOptions">
<widget:option name="logoUrl" value="https://apps.example.com/global/2.0/images/masthead.jpg" />
<widget:option name="loginLabel" value="User ID or Email" />
<widget:option name="passwordLabel" value="Password" />
<widget:option name="logoutLabel" value="Logout" />
<widget:option name="submitLabel" value="Sign In" />
<widget:option name="loadingCredential" value="Credentials validation loading..." />
<widget:option name="invalidCredential" value="The User ID / Password combination is incorrect." />
<widget:option name="warningTitle" value="ATTENTION" />
<widget:option name="warningText" value="Access to this website is restricted to users that have been authorized. " />
</widget:options>
</widget:plugin>
</widget:plugins>
Using Exposition Server application.ini config file:
exposition.widget.libraries.Auth = "UWA_Plugins_Auth.js";
exposition.widget.libraries.Auth = "UWA_Service_Auth_Adapter_Abstract.js";
exposition.widget.libraries.Auth = "UWA_Service_Auth_Adapter_SiteMinder.js";
exposition.widget.plugins.Auth.adapter = "SiteMinder";
exposition.widget.plugins.Auth.adapterOptions.smagentname = "abc...";
exposition.widget.plugins.Auth.adapterOptions....
exposition.widget.plugins.Auth.formOptions.logoUrl = "https://apps.example.com/global/2.0/images/masthead.jpg";
exposition.widget.plugins.Auth.formOptions....
Parameters
Name | Type | Description |
---|---|---|
widget |
Object | |
options |
Object | Options hash or a option/value pair. |
Index
Members
Members
-
state :Number
-
The current auth state.
0
init1
checking2
request credentials3
failure4
success
Type
- Number