/** * Get the user's authentication ticket. * * @return String */ public String getTicket() { return services.getAuthenticationService().getCurrentTicket(); } }
/** * Get the user's authentication ticket. * * @return String */ public String getTicket() { return services.getAuthenticationService().getCurrentTicket(); } }
/** * Get the current authentication ticket. * * @return String */ public String getTicket() { return services.getAuthenticationService().getCurrentTicket(); } }
@Override public String getCurrentUser() { return serviceRegistry.getAuthenticationService().getCurrentUserName(); }
/** * Get the current authentication ticket. * * @return String */ public String getTicket() { return services.getAuthenticationService().getCurrentTicket(); } }
@Override public String getCurrentUser() { return serviceRegistry.getAuthenticationService().getCurrentUserName(); }
/** * Change the password for the currently logged in user. * Old password must be supplied. * * @param oldPassword Old user password * @param newPassword New user password */ public void changePassword(String oldPassword, String newPassword) { ParameterCheck.mandatoryString("oldPassword", oldPassword); ParameterCheck.mandatoryString("newPassword", newPassword); this.services.getAuthenticationService().updateAuthentication( AuthenticationUtil.getFullyAuthenticatedUser(), oldPassword.toCharArray(), newPassword.toCharArray()); }
/** * Change the password for the currently logged in user. * Old password must be supplied. * * @param oldPassword Old user password * @param newPassword New user password */ public void changePassword(String oldPassword, String newPassword) { ParameterCheck.mandatoryString("oldPassword", oldPassword); ParameterCheck.mandatoryString("newPassword", newPassword); this.services.getAuthenticationService().updateAuthentication( AuthenticationUtil.getFullyAuthenticatedUser(), oldPassword.toCharArray(), newPassword.toCharArray()); }
/** * Login to Repository */ private void login() { // TODO: Replace with call to ServiceRegistry AuthenticationService auth = (AuthenticationService) serviceRegistry.getAuthenticationService(); auth.authenticate(toolContext.getUsername(), toolContext.getPassword().toCharArray()); logInfo("Connected as " + toolContext.getUsername()); }
/** * Set a password for the given user. Note that only an administrator * can perform this action, otherwise it will be ignored. * * @param userName Username to change password for * @param password Password to set */ public void setPassword(String userName, String password) { ParameterCheck.mandatoryString("userName", userName); ParameterCheck.mandatoryString("password", password); MutableAuthenticationService authService = this.services.getAuthenticationService(); if (this.authorityService.hasAdminAuthority() && (userName.equalsIgnoreCase(authService.getCurrentUserName()) == false)) { authService.setAuthentication(userName, password.toCharArray()); } }
/** * Login to Repository */ private void login() { // TODO: Replace with call to ServiceRegistry AuthenticationService auth = (AuthenticationService) serviceRegistry.getAuthenticationService(); auth.authenticate(toolContext.getUsername(), toolContext.getPassword().toCharArray()); logInfo("Connected as " + toolContext.getUsername()); }
/** * Return a list of objects representing the pooled tasks for the current user * * @return list of WorkflowTaskItem bean objects {@link WorkflowTaskItem} */ public List<WorkflowTaskItem> getPooledTasks() { // get the "pooled" tasks for the current user List<WorkflowTask> tasks = getWorkflowService().getPooledTasks( this.services.getAuthenticationService().getCurrentUserName()); return convertTasks(tasks); }
/** * Return a list of objects representing the pooled tasks for the current user * * @return list of WorkflowTaskItem bean objects {@link WorkflowTaskItem} */ public List<WorkflowTaskItem> getPooledTasks() { // get the "pooled" tasks for the current user List<WorkflowTask> tasks = getWorkflowService().getPooledTasks( this.services.getAuthenticationService().getCurrentUserName()); return convertTasks(tasks); }
/** * Return a list of objects representing the completed tasks for the current user * * @return list of WorkflowTaskItem bean objects {@link WorkflowTaskItem} */ public List<WorkflowTaskItem> getCompletedTasks() { // get the "completed" tasks for the current user List<WorkflowTask> tasks = getWorkflowService().getAssignedTasks( this.services.getAuthenticationService().getCurrentUserName(), WorkflowTaskState.COMPLETED); return convertTasks(tasks); }
/** * Return a list of objects representing the assigned tasks for the current user * * @return list of WorkflowTaskItem bean objects {@link WorkflowTaskItem} */ public List<WorkflowTaskItem> getAssignedTasks() { // get the "in progress" tasks for the current user List<WorkflowTask> tasks = getWorkflowService().getAssignedTasks( this.services.getAuthenticationService().getCurrentUserName(), WorkflowTaskState.IN_PROGRESS); return convertTasks(tasks); }
/** * Return a list of objects representing the assigned tasks for the current user * * @return list of WorkflowTaskItem bean objects {@link WorkflowTaskItem} */ public List<WorkflowTaskItem> getAssignedTasks() { // get the "in progress" tasks for the current user List<WorkflowTask> tasks = getWorkflowService().getAssignedTasks( this.services.getAuthenticationService().getCurrentUserName(), WorkflowTaskState.IN_PROGRESS); return convertTasks(tasks); }
/** * Return a list of objects representing the completed tasks for the current user * * @return list of WorkflowTaskItem bean objects {@link WorkflowTaskItem} */ public List<WorkflowTaskItem> getCompletedTasks() { // get the "completed" tasks for the current user List<WorkflowTask> tasks = getWorkflowService().getAssignedTasks( this.services.getAuthenticationService().getCurrentUserName(), WorkflowTaskState.COMPLETED); return convertTasks(tasks); }
@Before public void before() throws Exception { ServiceRegistry registry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); this.workflowService = registry.getWorkflowService(); this.authenticationComponent = (AuthenticationComponent) applicationContext.getBean("authenticationComponent"); this.nodeService = registry.getNodeService(); this.transactionHelper = (RetryingTransactionHelper) this.applicationContext .getBean("retryingTransactionHelper"); this.activitiProcessEngine = (ProcessEngine) this.applicationContext.getBean("activitiProcessEngine"); MutableAuthenticationService authenticationService = registry.getAuthenticationService(); PersonService personService = registry.getPersonService(); this.personManager = new TestPersonManager(authenticationService, personService, nodeService); authenticationComponent.setSystemUserAsCurrentUser(); }
@Before public void setUp() throws Exception { serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionHelper = serviceRegistry.getTransactionService().getRetryingTransactionHelper(); authenticationService = serviceRegistry.getAuthenticationService(); personService = serviceRegistry.getPersonService(); oauth2CredentialsStoreService = (OAuth2CredentialsStoreService) applicationContext.getBean("oauth2CredentialsStoreService"); AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER); createUser(TEST_USER_ONE); createUser(TEST_USER_TWO); }
@Before public void before() throws Exception { serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY); transactionHelper = serviceRegistry.getTransactionService().getRetryingTransactionHelper(); authenticationService = serviceRegistry.getAuthenticationService(); personService = serviceRegistry.getPersonService(); oauth1CredentialsStoreService = (OAuth1CredentialsStoreService) applicationContext.getBean("oauth1CredentialsStoreService"); AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER); createUser(TEST_USER_ONE); createUser(TEST_USER_TWO); }