Commit 2bd56c01 authored by Quxl's avatar Quxl

x

parent 892b1d5c
package com.egolm.sso.oauth; package com.egolm.sso.oauth;
import java.net.URLEncoder;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -46,7 +47,7 @@ public interface OAuthApi { ...@@ -46,7 +47,7 @@ public interface OAuthApi {
builder.setResponseType(OAuth.OAUTH_CODE); builder.setResponseType(OAuth.OAUTH_CODE);
builder.setClientId(config.getClientId()); builder.setClientId(config.getClientId());
builder.setRedirectURI(config.getRediretUrl()); builder.setRedirectURI(config.getRediretUrl());
builder.setScope(config.getScope()); builder.setScope(URLEncoder.encode(config.getScope(), "utf-8"));
builder.setParameter("realm", config.getRealm()); builder.setParameter("realm", config.getRealm());
OAuthClientRequest oauthResponse = builder.buildQueryMessage(); OAuthClientRequest oauthResponse = builder.buildQueryMessage();
response.sendRedirect(oauthResponse.getLocationUri()); response.sendRedirect(oauthResponse.getLocationUri());
......
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