spring-social:ProviderSignInController:为什么只用POST登录(...)?

问题描述 投票:0回答:1

用户登录{providerId}只能通过POST请求启动(到/ signin / {providerId})是否有特定原因?为什么不使用GET请求?

spring spring-security oauth spring-social
1个回答
0
投票

回答我自己的问题:也许是因为

/**
 * Process the authentication callback when neither the oauth_token or code parameter is given, likely indicating that the user denied authorization with the provider.
 * Redirects to application's sign in URL, as set in the signInUrl property.
 * @return A RedirectView to the sign in URL
 */
@RequestMapping(value="/{providerId}", method=RequestMethod.GET)
public RedirectView canceledAuthorizationCallback() {
    return redirect(signInUrl);
}

无论如何,如果也可以使用GET请求进行登录(使用不同的URL或缩小映射的参数)将会很好。

© www.soinside.com 2019 - 2024. All rights reserved.