本文整理了Java中org.openid4java.message.Message.getParameterMap()
方法的一些代码示例,展示了Message.getParameterMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getParameterMap()
方法的具体详情如下:
包路径:org.openid4java.message.Message
类名称:Message
方法名:getParameterMap
暂无
代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps
/**
* Gets the OpenID message as a ParameterList.
*
* @return ParameterList containing the OpenID message.
*/
public ParameterList getOpenIDParams() {
return new ParameterList(_openidMessage.getParameterMap());
}
代码示例来源:origin: org.openid4java/openid4java-nodeps
/**
* Gets the OpenID message as a ParameterList.
* @return ParameterList containing the OpenID message.
*/
public ParameterList getOpenIDParams()
{
return new ParameterList(_openidMessage.getParameterMap());
}
代码示例来源:origin: org.apereo.cas/cas-server-support-openid
/**
* We sign directly (final 'true') because we don't add extensions
* response message can be either a DirectError or an AuthSuccess here.
* Note:
* The association handle returned in the Response is either the 'public'
* created in a previous association, or is a 'private' handle created
* specifically for the verification step when in non-association mode
*
* @param service the service
* @param parameters the parameters
* @param successFullAuthentication the success full authentication
* @param id the id
* @param parameterList the parameter list
* @return response response
*/
protected Response buildAuthenticationResponse(final OpenIdService service,
final Map<String, String> parameters,
final boolean successFullAuthentication,
final String id,
final ParameterList parameterList) {
val response = serverManager.authResponse(parameterList, id, id, successFullAuthentication, true);
parameters.putAll(response.getParameterMap());
LOGGER.debug("Parameters passed for the OpenID response are [{}]", parameters.keySet());
return buildRedirect(service, parameters);
}
代码示例来源:origin: org.jasig.cas/cas-server-support-openid
/**
* We sign directly (final 'true') because we don't add extensions
* response message can be either a DirectError or an AuthSuccess here.
*
* @param serverManager the server manager
* @param ticketId the ticket id
* @param service the service
* @param parameters the parameters
* @param associated the associated
* @param successFullAuthentication the success full authentication
* @param id the id
* @return response response
*/
protected Response buildAuthenticationResponse(final ServerManager serverManager,
final String ticketId, final OpenIdService service,
final Map<String, String> parameters,
final boolean associated, final boolean successFullAuthentication,
final String id) {
final Message response = serverManager.authResponse(this.parameterList, id, id,
successFullAuthentication, true);
parameters.putAll(response.getParameterMap());
if (!associated) {
parameters.put(OpenIdProtocolConstants.OPENID_ASSOCHANDLE, ticketId);
}
return buildRedirect(service, parameters);
}
代码示例来源:origin: org.jasig.cas/cas-server-support-openid
/**
* Gets the association response. Determines the mode first.
* If mode is set to associate, will set the response. Then
* builds the response parameters next and returns.
*
* @param request the request
* @return the association response
*/
public Map<String, String> getAssociationResponse(final HttpServletRequest request) {
final ParameterList parameters = new ParameterList(request.getParameterMap());
final String mode = parameters.hasParameter(OpenIdProtocolConstants.OPENID_MODE)
? parameters.getParameterValue(OpenIdProtocolConstants.OPENID_MODE)
: null;
Message response = null;
if (StringUtils.equals(mode, OpenIdProtocolConstants.ASSOCIATE)) {
response = serverManager.associationResponse(parameters);
}
final Map<String, String> responseParams = new HashMap<>();
if (response != null) {
responseParams.putAll(response.getParameterMap());
}
return responseParams;
}
代码示例来源:origin: org.apereo.cas/cas-server-support-openid
/**
* Gets the association response. Determines the mode first.
* If mode is set to associate, will set the response. Then
* builds the response parameters next and returns.
*
* @param request the request
* @return the association response
*/
public Map<String, String> getAssociationResponse(final HttpServletRequest request) {
val parameters = new ParameterList(request.getParameterMap());
val mode = parameters.hasParameter(OpenIdProtocolConstants.OPENID_MODE)
? parameters.getParameterValue(OpenIdProtocolConstants.OPENID_MODE)
: null;
val response = FunctionUtils.doIf(StringUtils.equals(mode, OpenIdProtocolConstants.ASSOCIATE),
() -> this.serverManager.associationResponse(parameters),
() -> null)
.get();
val responseParams = new HashMap<String, String>();
if (response != null) {
responseParams.putAll(response.getParameterMap());
}
return responseParams;
}
代码示例来源:origin: com.cloudbees/openid4java-shaded
/**
* Makes a HTTP call to the specified URL with the parameters specified
* in the Message.
*
* @param url URL endpoint for the HTTP call
* @param request Message containing the parameters
* @param response ParameterList that will hold the parameters received in
* the HTTP response
* @return the status code of the HTTP call
*/
private int call(String url, Message request, ParameterList response)
throws MessageException
{
int responseCode = -1;
try
{
if (DEBUG) _log.debug("Performing HTTP POST on " + url);
HttpResponse resp = _httpFetcher.post(url, request.getParameterMap());
responseCode = resp.getStatusCode();
String postResponse = resp.getBody();
response.copyOf(ParameterList.createFromKeyValueForm(postResponse));
if (DEBUG) _log.debug("Retrived response:\n" + postResponse);
}
catch (IOException e)
{
_log.error("Error talking to " + url +
" response code: " + responseCode, e);
}
return responseCode;
}
代码示例来源:origin: org.openid4java/openid4java-nodeps
/**
* Makes a HTTP call to the specified URL with the parameters specified
* in the Message.
*
* @param url URL endpoint for the HTTP call
* @param request Message containing the parameters
* @param response ParameterList that will hold the parameters received in
* the HTTP response
* @return the status code of the HTTP call
*/
private int call(String url, Message request, ParameterList response)
throws MessageException
{
int responseCode = -1;
try
{
if (DEBUG) _log.debug("Performing HTTP POST on " + url);
HttpResponse resp = _httpFetcher.post(url, request.getParameterMap());
responseCode = resp.getStatusCode();
String postResponse = resp.getBody();
response.copyOf(ParameterList.createFromKeyValueForm(postResponse));
if (DEBUG) _log.debug("Retrived response:\n" + postResponse);
}
catch (IOException e)
{
_log.error("Error talking to " + url +
" response code: " + responseCode, e);
}
return responseCode;
}
代码示例来源:origin: org.openid4java/openid4java
/**
* Makes a HTTP call to the specified URL with the parameters specified
* in the Message.
*
* @param url URL endpoint for the HTTP call
* @param request Message containing the parameters
* @param response ParameterList that will hold the parameters received in
* the HTTP response
* @return the status code of the HTTP call
*/
private int call(String url, Message request, ParameterList response)
throws MessageException
{
int responseCode = -1;
try
{
if (DEBUG) _log.debug("Performing HTTP POST on " + url);
HttpResponse resp = _httpFetcher.post(url, request.getParameterMap());
responseCode = resp.getStatusCode();
String postResponse = resp.getBody();
response.copyOf(ParameterList.createFromKeyValueForm(postResponse));
if (DEBUG) _log.debug("Retrived response:\n" + postResponse);
}
catch (IOException e)
{
_log.error("Error talking to " + url +
" response code: " + responseCode, e);
}
return responseCode;
}
代码示例来源:origin: org.wso2.org.openid4java/openid4java-nodeps
/**
* Makes a HTTP call to the specified URL with the parameters specified
* in the Message.
*
* @param url URL endpoint for the HTTP call
* @param request Message containing the parameters
* @param response ParameterList that will hold the parameters received in
* the HTTP response
* @return the status code of the HTTP call
*/
private int call(String url, Message request, ParameterList response)
throws MessageException {
int responseCode = -1;
try {
if (DEBUG) {
_log.debug("Performing HTTP POST on " + url);
}
HttpResponse resp = _httpFetcher.post(url, request.getParameterMap());
responseCode = resp.getStatusCode();
String postResponse = resp.getBody();
response.copyOf(ParameterList.createFromKeyValueForm(postResponse));
if (DEBUG) {
_log.debug("Retrived response:\n" + postResponse);
}
} catch (IOException e) {
_log.error("Error talking to " + url +
" response code: " + responseCode, e);
}
return responseCode;
}
代码示例来源:origin: jbufu/openid4java
/**
* Makes a HTTP call to the specified URL with the parameters specified
* in the Message.
*
* @param url URL endpoint for the HTTP call
* @param request Message containing the parameters
* @param response ParameterList that will hold the parameters received in
* the HTTP response
* @return the status code of the HTTP call
*/
private int call(String url, Message request, ParameterList response)
throws MessageException
{
int responseCode = -1;
try
{
if (DEBUG) _log.debug("Performing HTTP POST on " + url);
HttpResponse resp = _httpFetcher.post(url, request.getParameterMap());
responseCode = resp.getStatusCode();
String postResponse = resp.getBody();
response.copyOf(ParameterList.createFromKeyValueForm(postResponse));
if (DEBUG) _log.debug("Retrived response:\n" + postResponse);
}
catch (IOException e)
{
_log.error("Error talking to " + url +
" response code: " + responseCode, e);
}
return responseCode;
}
代码示例来源:origin: org.restlet.jse/org.restlet.example
@SuppressWarnings("unchecked")
Map<String, String> m = (Map<String, String>) response
.getParameterMap();
for (String key : m.keySet()) {
f.add(key, m.get(key));
代码示例来源:origin: be.fedict.eid-idp/eid-idp-protocol-openid
Map<String, String> parameters = message.getParameterMap();
ReturnResponse returnResponse = new ReturnResponse(destinationUrl);
for (String paramKey : parameters.keySet()) {
内容来源于网络,如有侵权,请联系作者删除!