Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

先进行授权,需要登陆,为什么登陆之后,这里为什么为空? #28

Open
SpriderMan opened this issue Jan 2, 2019 · 2 comments

Comments

@SpriderMan
Copy link

public void onAuthenticationSuccess(HttpServletRequest request,
HttpServletResponse response, Authentication authentication)
throws ServletException, IOException {
SavedRequest savedRequest = requestCache.getRequest(request, response);

	if (savedRequest == null) {
		super.onAuthenticationSuccess(request, response, authentication);

		return;
	}

...}

为什么savedRequest会为空

@SpriderMan
Copy link
Author

public SavedRequest getRequest(HttpServletRequest currentRequest,
HttpServletResponse response) {
HttpSession session = currentRequest.getSession(false);

	if (session != null) {
		return (SavedRequest) session.getAttribute(this.sessionAttrName);
	}

	return null;
}

发现是session为空导致的

@SpriderMan
Copy link
Author

想不明白为什么session这里为什么会为null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant