public class LoginComponent extends DefaultComponent implements LoginService
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
LoginComponent.SystemID  | 
| Modifier and Type | Field and Description | 
|---|---|
static String | 
CLIENT_LOGIN  | 
protected static String | 
instanceId  | 
protected static org.apache.commons.logging.Log | 
log  | 
static ComponentName | 
NAME  | 
static String | 
SYSTEM_LOGIN  | 
static String | 
SYSTEM_USERNAME  | 
protected static SystemLoginRestrictionManager | 
systemLoginManager  | 
lastModified, name| Constructor and Description | 
|---|
LoginComponent()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
activate(ComponentContext context)
Activates the component. 
 | 
void | 
addSecurityDomain(SecurityDomain domain)  | 
void | 
deactivate(ComponentContext context)
Deactivates the component. 
 | 
<T> T | 
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object. 
 | 
AppConfigurationEntry[] | 
getAppConfigurationEntry(String name)  | 
SecurityDomain | 
getSecurityDomain(String name)  | 
SecurityDomain[] | 
getSecurityDomains()  | 
boolean | 
isSystemId(Principal principal)  | 
static boolean | 
isSystemLogin(Object principal)  | 
LoginContext | 
login()
System login, using a private principal that has all privileges. 
 | 
LoginContext | 
login(CallbackHandler cbHandler)
Client login using a custom callback handler to retrieve login info. 
 | 
LoginContext | 
login(String username,
     Object credentials)
Client login using the given username and password. 
 | 
LoginContext | 
loginAs(String username)
System login, using a private principal that has all privileges. 
 | 
void | 
registerContribution(Object contribution,
                    String extensionPoint,
                    ComponentInstance contributor)  | 
void | 
removeSecurityDomain(String name)  | 
void | 
removeSecurityDomains()  | 
void | 
unregisterContribution(Object contribution,
                      String extensionPoint,
                      ComponentInstance contributor)  | 
getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderpublic static final ComponentName NAME
public static final String SYSTEM_LOGIN
public static final String CLIENT_LOGIN
public static final String SYSTEM_USERNAME
protected static final String instanceId
protected static final SystemLoginRestrictionManager systemLoginManager
protected static final org.apache.commons.logging.Log log
public LoginComponent()
public void activate(ComponentContext context)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic AppConfigurationEntry[] getAppConfigurationEntry(String name)
public <T> T getAdapter(Class<T> adapter)
Adaptablenull
 if no such object can be found.getAdapter in interface AdaptablegetAdapter in class DefaultComponentadapter - the adapter class to look upnull if this object does not have an adapter for
         the given classpublic SecurityDomain getSecurityDomain(String name)
getSecurityDomain in interface LoginServicepublic void addSecurityDomain(SecurityDomain domain)
addSecurityDomain in interface LoginServicepublic void removeSecurityDomain(String name)
removeSecurityDomain in interface LoginServicepublic SecurityDomain[] getSecurityDomains()
getSecurityDomains in interface LoginServicepublic void removeSecurityDomains()
removeSecurityDomains in interface LoginServicepublic LoginContext login() throws LoginException
LoginService
 The method requires the caller to have the SystemLoginPermission permission.
login in interface LoginServiceLoginExceptionpublic LoginContext loginAs(String username) throws LoginException
LoginService
 The method requires the caller to have the SystemLoginPermission permission.
loginAs in interface LoginServiceusername - the username that originated the system loginLoginExceptionpublic LoginContext login(String username, Object credentials) throws LoginException
LoginServicelogin in interface LoginServiceLoginExceptionpublic LoginContext login(CallbackHandler cbHandler) throws LoginException
LoginServicelogin in interface LoginServicecbHandler - the callback handler to use to retrieve the login infoLoginExceptionpublic boolean isSystemId(Principal principal)
isSystemId in interface LoginServicepublic static boolean isSystemLogin(Object principal)
Copyright © 2019 Nuxeo. All rights reserved.