List<String> values = fetchResp.getAttributeValues(attr.getName()); if (!values.isEmpty()) { OpenIDAttribute fetched = new OpenIDAttribute(attr.getName(),
.createFetchResponse(); fetchResponse.addAttribute(alias, typeUri, value); fetchResponse.addAttribute(alias, typeUri, value);
FetchResponse resp = new FetchResponse(); resp.addAttribute(alias, (String) attributes.get(alias), (String) value); resp.addAttribute(alias, (String) attributes.get(alias), val);
fetchResponse = FetchResponse.createFetchResponse(fetchRequest, new HashMap()); claimValues = populateAttributeValues(requiredAttributes, userId, profileName, requestDTO); if (MapUtils.isNotEmpty(claimValues)) {
attributes = fetchResp.getAttributes();
public static FetchResponse createFetchResponse(ParameterList params) throws MessageException { FetchResponse resp = new FetchResponse(params); if (! resp.isValid()) throw new MessageException("Invalid parameters for a fetch response"); if (DEBUG) _log.debug("Created fetch response from parameter list:\n" + params); return resp; }
FetchResponse fetchResp = FetchResponse.createFetchResponse(); fetchResp.addAttributes(attrs); openidResp.addExtension(fetchResp);
/** * Populate the response with claim values. If we can't find the required values with us, we * simply avoid sending them. An Identity Provider MAY return any subset of the following fields * in response to the query. * * @param claimValues Claim values. * @throws MessageException */ protected void setAttributeExchangeValues(FetchResponse response, Map<String, OpenIDClaimDTO> claimValues) throws MessageException { Iterator<Entry<String, OpenIDClaimDTO>> iterator = null; Entry<String, OpenIDClaimDTO> entry = null; OpenIDClaimDTO claim = null; iterator = claimValues.entrySet().iterator(); while (iterator.hasNext()) { entry = iterator.next(); claim = entry.getValue(); response.addAttribute(claim.getClaimUri(), claim.getClaimValue()); } } }
/** * Constructs a Fetch Response with an empty parameter list. */ public static FetchResponse createFetchResponse() { return new FetchResponse(); }
List attributeValues = fetchResp.getAttributeValuesByTypeUri(claimUri);
.getAttributeTypes(); for (Map.Entry<String, String> entry : attributeTypes .entrySet()) { attributeMap .put(entry.getValue(), fetchResponse .getAttributeValue(entry.getKey()));
.getExtension(AxMessage.OPENID_NS_AX); p.setEmail(fetchResp.getAttributeValue("email")); p.setFirstName(fetchResp.getAttributeValue("firstname")); p.setLastName(fetchResp.getAttributeValue("lastname")); p.setFullName(fetchResp.getAttributeValue("fullname")); p.setEmail(fetchResp.getAttributeValue("emailax")); .getAttributeValue("firstnameax")); p.setLastName(fetchResp.getAttributeValue("lastnameax")); p.setFullName(fetchResp.getAttributeValue("fullnameax"));
FetchResponse.createFetchResponse(fetchReq, userDataExt); fetchResp.addAttribute("email", "http://schema.openid.net/contact/email", email); response.addExtension(fetchResp);
throws MessageException FetchResponse resp = new FetchResponse(); resp.addAttribute(alias, (String) attributes.get(alias), (String)value); resp.addAttribute(alias, (String) attributes.get(alias), val);
fetchResponse = FetchResponse.createFetchResponse(fetchRequest, new HashMap()); claimValues = populateAttributeValues(requiredAttributes, userId, profileName, requestDTO); if (MapUtils.isNotEmpty(claimValues)) {
attributes = fetchResp.getAttributes();
public static FetchResponse createFetchResponse(ParameterList params) throws MessageException { FetchResponse resp = new FetchResponse(params); if (! resp.isValid()) throw new MessageException("Invalid parameters for a fetch response"); if (DEBUG) _log.debug("Created fetch response from parameter list:\n" + params); return resp; }
FetchResponse fetchResp = FetchResponse.createFetchResponse(); fetchResp.addAttributes(attrs); openidResp.addExtension(fetchResp);
/** * Populate the response with claim values. If we can't find the required values with us, we * simply avoid sending them. An Identity Provider MAY return any subset of the following fields * in response to the query. * * @param claimValues Claim values. * @throws MessageException */ protected void setAttributeExchangeValues(FetchResponse response, Map<String, OpenIDClaimDTO> claimValues) throws MessageException { Iterator<Entry<String, OpenIDClaimDTO>> iterator = null; Entry<String, OpenIDClaimDTO> entry = null; OpenIDClaimDTO claim = null; iterator = claimValues.entrySet().iterator(); while (iterator.hasNext()) { entry = iterator.next(); claim = entry.getValue(); response.addAttribute(claim.getClaimUri(), claim.getClaimValue()); } } }
/** * Constructs a Fetch Response with an empty parameter list. */ public static FetchResponse createFetchResponse() { return new FetchResponse(); }