Depending on configured
Authentication mode, user authentication might be required prior to requesting
any embedded analytics data from Kyubit BI application. If 'Windows Integrated Authentication' (default) is used, current user credentials using the browser are automatically used
to identify current user and explicit user authentication is not required (In that case skip Authentication step). If 'Windows Login Form' authentication or 'Kyubit Users' authentication is configured, explicit user is required as described below.
This method is called to get status, if user is already authenticated and take 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 user is not authenticated and explicit authentication is required, use one of the appropriate methods to authenticate user with 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.");
}
}
})