本文整理了Java中org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId()
方法的一些代码示例,展示了Authentication.setAuthenticatedUserId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Authentication.setAuthenticatedUserId()
方法的具体详情如下:
包路径:org.activiti.engine.impl.identity.Authentication
类名称:Authentication
方法名:setAuthenticatedUserId
暂无
代码示例来源:origin: Activiti/Activiti
@Override
protected void setUp() throws Exception {
super.setUp();
// Always reset authenticated user to avoid any mistakes
Authentication.setAuthenticatedUserId(null);
}
代码示例来源:origin: Activiti/Activiti
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(username);
代码示例来源:origin: com.github.hongframework/hframe-workflow
public void logout(LoggedInUser userTologout) {
Authentication.setAuthenticatedUserId(null);
}
代码示例来源:origin: org.activiti/activiti-engine
public void setAuthenticatedUserId(String authenticatedUserId) {
Authentication.setAuthenticatedUserId(authenticatedUserId);
}
代码示例来源:origin: org.activiti.cloud/activiti-cloud-services-identity-keycloak
protected void setAuthenticatedUserId(String userId) {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(userId);
}
}
代码示例来源:origin: org.activiti/activiti-explorer
public void logout(LoggedInUser userToLogout) {
// Clear activiti authentication context
Authentication.setAuthenticatedUserId(null);
}
代码示例来源:origin: org.flowable/flowable5-engine
@Override
public void setAuthenticatedUserId(String authenticatedUserId) {
Authentication.setAuthenticatedUserId(authenticatedUserId);
}
代码示例来源:origin: com.bbossgroups.activiti/activiti-engine
public void setAuthenticatedUserId(String authenticatedUserId) {
Authentication.setAuthenticatedUserId(authenticatedUserId);
}
代码示例来源:origin: org.activiti/activiti-explorer
public void onRequestEnd(HttpServletRequest request, HttpServletResponse response) {
// Clean up thread-local app
current.remove();
// Clear authentication context
Authentication.setAuthenticatedUserId(null);
// Callback to the login handler
loginHandler.onRequestEnd(request, response);
if(!isRunning() && !invalidatedSession) {
// Clear the session context, the application has been closed during this request, otherwise
// the application will be stuck on the spring-session scope and will be reused on the next
// request, which will lead to problems
if(request.getSession(false) != null) {
request.getSession().invalidate();
invalidatedSession = true;
}
}
}
代码示例来源:origin: Activiti/activiti-examples
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(username);
代码示例来源:origin: Activiti/activiti-examples
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(username);
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void claimTask(String taskId, String userId) {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
try {
getProcessEngine().getTaskService().claim(taskId, userId);
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void deleteAttachment(String attachmentId) {
try {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
getProcessEngine().getTaskService().deleteAttachment(attachmentId);
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void completeTask(TaskEntity taskEntity, Map<String, Object> variables, boolean localScope) {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
try {
getProcessEngine().getTaskService().complete(taskEntity.getId(), variables, localScope);
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public ProcessInstance submitStartFormData(String processDefinitionId, String businessKey, Map<String, String> properties) {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
try {
return new Flowable5ProcessInstanceWrapper(getProcessEngine().getFormService().submitStartFormData(processDefinitionId, businessKey, properties));
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
return null;
}
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void completeTask(TaskEntity taskEntity, Map<String, Object> variables, Map<String, Object> transientVariables) {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
try {
getProcessEngine().getTaskService().complete(taskEntity.getId(), variables, transientVariables);
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void submitTaskFormData(String taskId, Map<String, String> properties, boolean completeTask) {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
try {
if (completeTask) {
getProcessEngine().getFormService().submitTaskFormData(taskId, properties);
} else {
getProcessEngine().getFormService().saveFormData(taskId, properties);
}
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
代码示例来源:origin: org.activiti/activiti-explorer
public void onRequestStart(HttpServletRequest request, HttpServletResponse response) {
// Set current application object as thread-local to make it easy accessible
current.set(this);
// Authentication: check if user is found, otherwise send to login page
LoggedInUser user = (LoggedInUser) getUser();
if (user == null) {
// First, try automatic login
user = loginHandler.authenticate(request, response);
if(user == null) {
if (mainWindow != null && !mainWindow.isShowingLoginPage()) {
viewManager.showLoginPage();
}
} else {
setUser(user);
}
}
if(user != null) {
Authentication.setAuthenticatedUserId(user.getId());
if (mainWindow != null && mainWindow.isShowingLoginPage()) {
viewManager.showDefaultPage();
}
}
// Callback to the login handler
loginHandler.onRequestStart(request, response);
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public Attachment createAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, InputStream content, String url) {
try {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
if (content != null) {
return new Flowable5AttachmentWrapper(getProcessEngine().getTaskService().createAttachment(attachmentType, taskId, processInstanceId, attachmentName, attachmentDescription, content));
} else {
return new Flowable5AttachmentWrapper(getProcessEngine().getTaskService().createAttachment(attachmentType, taskId, processInstanceId, attachmentName, attachmentDescription, url));
}
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
return null;
}
}
代码示例来源:origin: org.flowable/flowable5-compatibility
@Override
public void saveAttachment(Attachment attachment) {
try {
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUserId(Authentication.getAuthenticatedUserId());
org.activiti.engine.task.Attachment activiti5Attachment = getProcessEngine().getTaskService().getAttachment(attachment.getId());
activiti5Attachment.setName(attachment.getName());
activiti5Attachment.setDescription(attachment.getDescription());
activiti5Attachment.setTime(attachment.getTime());
getProcessEngine().getTaskService().saveAttachment(activiti5Attachment);
} catch (org.activiti.engine.ActivitiException e) {
handleActivitiException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!