Depending on the configured
Authentication mode, user authentication might be required prior to requesting
any embedded analytics data from the Kyubit BI application. If 'Windows Integrated Authentication' (default) is used, current user credentials using the browser are automatically used
to identify the current user, and explicit user authentication is not required (In that case skip the authentication step). If 'Windows Login Form' authentication or 'Kyubit Users' authentication is configured, the explicit user is required as described below.
This method is called to get status, if a user is already authenticated and takes the appropriate next step...
$(document).ready(function () {
$kyu.getSessionAuthInfo(function (info) {
//Check details on authentication of the current user
//Example...
//alert(info.IsAuthenticated);
//alert(info.AuthenticationMethod);
//alert(info.UserName);
if (info.IsAuthenticated) {
//user is already authenticated, proceed to display data from Kyubit BI
showAnalysis();
}
else
{
login();
}
});
});
If the user is not authenticated and explicit authentication is required, use one of the appropriate methods to authenticate the user with a username and password.
//Windows Explicit Authentication (Login Form)
$kyu.loginWin({
domain: "domainname",
userName: "winusername",
password: "password",
callback: function (info) {
if (info.IsAuthenticated) {
showAnalysis();
}
else {
alert("Authentication problem.");
}
}
})
//Kyubit User Authentication
$kyu.login({
userName: "username",
password: "password",
callback: function (info) {
if (info.IsAuthenticated) {
showAnalysis();
}
else
{
alert("Authentication problem.");
}
}
})