Java Code Examples for org.openid4java.message.ParameterList#getParameters()
The following examples show how to use
org.openid4java.message.ParameterList#getParameters() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenIDAdminClient.java From carbon-identity with Apache License 2.0 | 6 votes |
/** * @param openid * @return * @throws IdentityProviderException */ public OpenIDUserProfileDTO[] getUserProfiles(String openid, ParameterList requredClaims) throws IdentityProviderException { OpenIDParameterDTO[] params = null; List list = null; list = requredClaims.getParameters(); params = new OpenIDParameterDTO[list.size()]; int i = 0; for (Object object : list) { Parameter param = (Parameter) object; OpenIDParameterDTO openIDParameterDTO = new OpenIDParameterDTO(); openIDParameterDTO.setName(param.getKey()); openIDParameterDTO.setValue(param.getValue()); params[i++] = openIDParameterDTO; } return openIDProviderService.getUserProfiles(openid, params); }
Example 2
Source File: OpenIDUtil.java From carbon-identity with Apache License 2.0 | 6 votes |
public static OpenIDParameterDTO[] getOpenIDAuthRequest(ParameterList request) { OpenIDParameterDTO[] params = null; List list = null; list = request.getParameters(); params = new OpenIDParameterDTO[list.size()]; int i = 0; for (Object object : list) { Parameter param = (Parameter) object; OpenIDParameterDTO openIDParameterDTO = new OpenIDParameterDTO(); openIDParameterDTO.setName(param.getKey()); openIDParameterDTO.setValue(param.getValue()); params[i++] = openIDParameterDTO; } return params; }
Example 3
Source File: OpenIDAdminClient.java From carbon-identity with Apache License 2.0 | 5 votes |
public Map<String, OpenIDClaimDTO> getClaimValues(String openId, String profileId, ParameterList requiredClaims) throws IdentityProviderException { List list = requiredClaims.getParameters(); OpenIDParameterDTO[] params = new OpenIDParameterDTO[list.size()]; int i = 0; for (Object object : list) { Parameter param = (Parameter) object; OpenIDParameterDTO openIDParameterDTO = new OpenIDParameterDTO(); openIDParameterDTO.setName(param.getKey()); openIDParameterDTO.setValue(param.getValue()); params[i++] = openIDParameterDTO; } OpenIDClaimDTO[] claims = openIDProviderService.getClaimValues(openId.trim(), profileId, params); Map<String, OpenIDClaimDTO> map = new HashMap<String, OpenIDClaimDTO>(); if (claims != null) { for (int j = 0; j < claims.length; j++) { if (claims[j] != null) { map.put(claims[j].getClaimUri(), claims[j]); } } } return map; }