org.jeecg.modules.shiro.authc.JwtToken Java Examples

The following examples show how to use org.jeecg.modules.shiro.authc.JwtToken. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JwtFilter.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
/**
 *
 */
@Override
protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
	HttpServletRequest httpServletRequest = (HttpServletRequest) request;
	String token = httpServletRequest.getHeader(DefContants.X_ACCESS_TOKEN);

	JwtToken jwtToken = new JwtToken(token);
	// 提交给realm进行登入,如果错误他会抛出异常并被捕获
	getSubject(request, response).login(jwtToken);
	// 如果没有抛出异常则代表登入成功,返回true
	return true;
}
 
Example #2
Source File: JwtFilter.java    From jeecg-boot-with-activiti with MIT License 5 votes vote down vote up
/**
 *
 */
@Override
protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
	HttpServletRequest httpServletRequest = (HttpServletRequest) request;
	String token = httpServletRequest.getHeader(DefContants.X_ACCESS_TOKEN);

	JwtToken jwtToken = new JwtToken(token);
	// 提交给realm进行登入,如果错误他会抛出异常并被捕获
	getSubject(request, response).login(jwtToken);
	// 如果没有抛出异常则代表登入成功,返回true
	return true;
}
 
Example #3
Source File: JwtFilter.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
 *
 */
@Override
protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
	HttpServletRequest httpServletRequest = (HttpServletRequest) request;
	String token = httpServletRequest.getHeader(DefContants.X_ACCESS_TOKEN);

	JwtToken jwtToken = new JwtToken(token);
	// 提交给realm进行登入,如果错误他会抛出异常并被捕获
	getSubject(request, response).login(jwtToken);
	// 如果没有抛出异常则代表登入成功,返回true
	return true;
}
 
Example #4
Source File: JwtFilter.java    From jeecg-boot with Apache License 2.0 5 votes vote down vote up
/**
 *
 */
@Override
protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
	HttpServletRequest httpServletRequest = (HttpServletRequest) request;
	String token = httpServletRequest.getHeader(DefContants.X_ACCESS_TOKEN);

	JwtToken jwtToken = new JwtToken(token);
	// 提交给realm进行登入,如果错误他会抛出异常并被捕获
	getSubject(request, response).login(jwtToken);
	// 如果没有抛出异常则代表登入成功,返回true
	return true;
}