Wednesday, May 14, 2014

Most Used ADF security Context methods

Check if the current user authenticated?
ADFContext.getCurrent().getSecurityContext().isAuthenticated();
Return Boolean;

Get the currently Logged in user.
ADFContext.getCurrent().getSecurityContext().getUserName()
Return String;

Check if the user is present in a given Role
ADFContext.getCurrent().getSecurityContext().isUserInRole("Role-Name")
Return Boolean

Get the Array of roles of current user
ADFContext.getCurrent().getSecurityContext().getUserRoles()
Return String[]

Check if Authentication is enabled for the application
ADFContext.getCurrent().getSecurityContext().isAuthenticationEnabled()
Return Boolean

Check if Authorization is enabled for the application
ADFContext.getCurrent().getSecurityContext().isAuthorizationEnabled()
Return Boolean  

No comments:

Post a Comment