Commit c723c452 authored by Quxl's avatar Quxl

x

parent 73931906
...@@ -21,7 +21,7 @@ public interface OAuthApi { ...@@ -21,7 +21,7 @@ public interface OAuthApi {
OAuthConfig getOAuthConfig(); OAuthConfig getOAuthConfig();
default void toLoginPage(HttpServletResponse response) throws IOException, OAuthSystemException { default void sendOAuthLoginRedirect(HttpServletResponse response) throws IOException, OAuthSystemException {
OAuthConfig config = this.getOAuthConfig(); OAuthConfig config = this.getOAuthConfig();
AuthenticationRequestBuilder builder = OAuthClientRequest.authorizationLocation(config.getAuthorizeUrl()); AuthenticationRequestBuilder builder = OAuthClientRequest.authorizationLocation(config.getAuthorizeUrl());
builder.setResponseType(OAuth.OAUTH_CODE); builder.setResponseType(OAuth.OAUTH_CODE);
...@@ -32,7 +32,7 @@ public interface OAuthApi { ...@@ -32,7 +32,7 @@ public interface OAuthApi {
response.sendRedirect(oauthResponse.getLocationUri()); response.sendRedirect(oauthResponse.getLocationUri());
} }
default OAuthToken getToken(HttpServletRequest request) throws OAuthProblemException, OAuthSystemException { default OAuthToken getOAuthToken(HttpServletRequest request) throws OAuthProblemException, OAuthSystemException {
OAuthConfig config = this.getOAuthConfig(); OAuthConfig config = this.getOAuthConfig();
OAuthAuthzResponse oauthAuthzResponse = OAuthAuthzResponse.oauthCodeAuthzResponse(request); OAuthAuthzResponse oauthAuthzResponse = OAuthAuthzResponse.oauthCodeAuthzResponse(request);
String code = oauthAuthzResponse.getCode(); String code = oauthAuthzResponse.getCode();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment