public class LoginSession extends Object
Constructor and Description |
---|
LoginSession(BundleContext context,
String username,
String password,
LoginContext loginContext,
Collection<LoginHandler> handler) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
LoginContext |
getLoginContext() |
String |
getPassword() |
String |
getUsername() |
boolean |
hasRole(String role)
Checks with all login handler if the session has a role granted
|
void |
register() |
public LoginSession(BundleContext context, String username, String password, LoginContext loginContext, Collection<LoginHandler> handler)
public String getPassword()
public String getUsername()
public LoginContext getLoginContext()
public void register()
public void dispose()
public boolean hasRole(String role)
If no handler grants the role, the default false
is returned.
role
- the role to checktrue
if the role was granted, false
otherwise