authorize();
}
private void authorize()
{
IAuthorizationStrategy authorizationStrategy = null;
if (Session.exists())
{
authorizationStrategy = Session.get().getAuthorizationStrategy();
}
else if (Application.exists())
{
authorizationStrategy = Application.get().getSecuritySettings().getAuthorizationStrategy();
}
if (authorizationStrategy != null && authorizationStrategy.isResourceAuthorized(resource, parameters) == false)
{
if (Application.exists())
{
Application.get().getSecuritySettings().getUnauthorizedResourceRequestListener().onUnauthorizedRequest(resource, parameters);
}