/** * Signs an AuthSuccess message, using the association identified by the * handle specified within the message. * * @param authSuccess The Authentication Success message to be signed. * * @throws ServerException If the Association corresponding to the handle * in the @authSuccess cannot be retrieved from * the store. * @throws AssociationException If the signature cannot be computed. * */ public void sign(AuthSuccess authSuccess) throws ServerException, AssociationException { String handle = authSuccess.getHandle(); // try shared associations first, then private Association assoc = _sharedAssociations.load(handle); if (assoc == null) assoc = _privateAssociations.load(handle); if (assoc == null) throw new ServerException( "No association found for handle: " + handle); authSuccess.setSignature(assoc.sign(authSuccess.getSignedText())); }
/** * Signs an AuthSuccess message, using the association identified by the * handle specified within the message. * * @param authSuccess The Authentication Success message to be signed. * * @throws ServerException If the Association corresponding to the handle * in the @authSuccess cannot be retrieved from * the store. * @throws AssociationException If the signature cannot be computed. * */ public void sign(AuthSuccess authSuccess) throws ServerException, AssociationException { String handle = authSuccess.getHandle(); // try shared associations first, then private Association assoc = _sharedAssociations.load(handle); if (assoc == null) assoc = _privateAssociations.load(handle); if (assoc == null) throw new ServerException( "No association found for handle: " + handle); authSuccess.setSignature(assoc.sign(authSuccess.getSignedText())); }
/** * Gets association. * * @param serverManager the server manager * @param parameterList the parameter list * @return the association */ protected Association getAssociation(final ServerManager serverManager, final ParameterList parameterList) { try { val authReq = AuthRequest.createAuthRequest(parameterList, serverManager.getRealmVerifier()); val parameterMap = authReq.getParameterMap(); if (parameterMap != null && !parameterMap.isEmpty()) { val assocHandle = (String) parameterMap.get(OpenIdProtocolConstants.OPENID_ASSOCHANDLE); if (assocHandle != null) { return serverManager.getSharedAssociations().load(assocHandle); } } } catch (final MessageException e) { LOGGER.error("Message exception : [{}]", e.getMessage(), e); } return null; }
/** * Gets association. * * @param serverManager the server manager * @return the association */ protected Association getAssociation(final ServerManager serverManager) { try { final AuthRequest authReq = AuthRequest.createAuthRequest(this.parameterList, serverManager.getRealmVerifier()); final Map parameterMap = authReq.getParameterMap(); if (parameterMap != null && !parameterMap.isEmpty()) { final String assocHandle = (String) parameterMap.get(OpenIdProtocolConstants.OPENID_ASSOCHANDLE); if (assocHandle != null) { return serverManager.getSharedAssociations().load(assocHandle); } } } catch (final MessageException me) { LOGGER.error("Message exception : {}", me.getMessage(), me); } return null; }
/** * Signs an AuthSuccess message, using the association identified by the * handle specified within the message. * * @param authSuccess The Authentication Success message to be signed. * * @throws ServerException If the Association corresponding to the handle * in the @authSuccess cannot be retrieved from * the store. * @throws AssociationException If the signature cannot be computed. * */ public void sign(AuthSuccess authSuccess) throws ServerException, AssociationException { String handle = authSuccess.getHandle(); // try shared associations first, then private Association assoc = _sharedAssociations.load(handle); if (assoc == null) assoc = _privateAssociations.load(handle); if (assoc == null) throw new ServerException( "No association found for handle: " + handle); authSuccess.setSignature(assoc.sign(authSuccess.getSignedText())); }
/** * Signs an AuthSuccess message, using the association identified by the * handle specified within the message. * * @param authSuccess The Authentication Success message to be signed. * * @throws ServerException If the Association corresponding to the handle * in the @authSuccess cannot be retrieved from * the store. * @throws AssociationException If the signature cannot be computed. * */ public void sign(AuthSuccess authSuccess) throws ServerException, AssociationException { String handle = authSuccess.getHandle(); // try shared associations first, then private Association assoc = _sharedAssociations.load(handle); if (assoc == null) assoc = _privateAssociations.load(handle); if (assoc == null) throw new ServerException( "No association found for handle: " + handle); authSuccess.setSignature(assoc.sign(authSuccess.getSignedText())); }
Association assoc = getPrivateAssociations().load(handle); String sigMod = null; if (assoc != null) { // verify the signature String invalidateHandle = vrfyReq.getInvalidateHandle(); if (invalidateHandle != null && getSharedAssociations().load(invalidateHandle) == null) { if (log.isDebugEnabled()) { log.debug("Shared association invalidated; handle: " + invalidateHandle);
Association assoc = getPrivateAssociations().load(handle); String sigMod = null; if (assoc != null) { // verify the signature String invalidateHandle = vrfyReq.getInvalidateHandle(); if (invalidateHandle != null && getSharedAssociations().load(invalidateHandle) == null) { if (log.isDebugEnabled()) { log.debug("Shared association invalidated; handle: " + invalidateHandle);
public void sign(AuthSuccess authSuccess) throws ServerException, AssociationException { String handle = authSuccess.getHandle(); Association assoc = null; try { // First try in thread local assoc = getThreadLocalAssociation(); } finally { // Clear thread local clearThreadLocalAssociation(); } // try shared associations, then private if (assoc == null) { assoc = getSharedAssociations().load(handle); } if (assoc == null) { assoc = getPrivateAssociations().load(handle); } if (assoc == null) { throw new ServerException("No association found for handle: " + handle); } authSuccess.setSignature(assoc.sign(authSuccess.getSignedText())); }
Association assoc = _privateAssociations.load(handle); if (assoc != null) // verify the signature String invalidateHandle = vrfyReq.getInvalidateHandle(); if (invalidateHandle != null && _sharedAssociations.load(invalidateHandle) == null) { if (DEBUG) { _log.debug("Confirming shared association invalidate handle: " + invalidateHandle);
public void sign(AuthSuccess authSuccess) throws ServerException, AssociationException { String handle = authSuccess.getHandle(); Association assoc = null; try { // First try in thread local assoc = getThreadLocalAssociation(); } finally { // Clear thread local clearThreadLocalAssociation(); } // try shared associations, then private if (assoc == null) { assoc = getSharedAssociations().load(handle); } if (assoc == null) { assoc = getPrivateAssociations().load(handle); } if (assoc == null) { throw new ServerException("No association found for handle: " + handle); } authSuccess.setSignature(assoc.sign(authSuccess.getSignedText())); }
assoc = _sharedAssociations.load(handle); if (assoc == null)
assoc = _sharedAssociations.load(handle); if (assoc == null)
assoc = _sharedAssociations.load(handle); if (assoc == null) { _log.info("Invalidating handle: " + handle);
assoc = _sharedAssociations.load(handle); if (assoc == null)