Package org.wso2.carbon.identity.relyingparty

Examples of org.wso2.carbon.identity.relyingparty.RelyingPartyException


   * This method checks whether the certificate is present in the certificate store
   */
  public static boolean checkSystemStore(X509Certificate signedCert, KeyStore systemStore)
      throws Exception {
    if (signedCert == null || systemStore == null) {
      throw new RelyingPartyException("invalidInputParams");
    }

    // validity period
    signedCert.checkValidity();

    try {
      return systemStore.containsAlias(signedCert.getIssuerDN().getName());
    } catch (KeyStoreException e) {
      log.error("The keystore has not been initialized", e);
      throw new RelyingPartyException("errorLoadingTrustedKeystore", e);
    }
  }
View Full Code Here


   */
  public static boolean isBlackListed(List[] blackList, X509Certificate cert)
      throws RelyingPartyException {

    if (cert == null) {
      throw new RelyingPartyException("noCertInToken");
    }

    if (blackList != null && blackList.length > 0) {
      List certDN = getDNOfIssuer(cert.getIssuerDN().getName());
      for (int i = 0; i < blackList.length; i++) {
View Full Code Here

   */
  public static boolean isWhiteListed(List[] whiteList, X509Certificate cert)
      throws RelyingPartyException {

    if (cert == null) {
      throw new RelyingPartyException("noCertInToken");
    }

    if (whiteList != null && whiteList.length > 0) {
      List certDN = getDNOfIssuer(cert.getIssuerDN().getName());
      for (int i = 0; i < whiteList.length; i++) {
View Full Code Here

  private static boolean isInKeyStore(X509Certificate signedCert, KeyStore keyStore)
      throws Exception {

    if (signedCert == null || keyStore == null) {
      throw new RelyingPartyException("invalidInputParams");
    }

    // validity period
    signedCert.checkValidity();

    try {
      if (keyStore.getCertificateAlias(signedCert) != null) {
        return true;
      } else {
        return false;
      }
    } catch (KeyStoreException e) {
      log.error("The keystore has not been initialized", e);
      throw new RelyingPartyException("errorLoadingTrustedKeystore", e);
    }
  }
View Full Code Here

                validated = false;
            } else {
                validated = true;
            }
        } catch (Exception e) {
            throw new RelyingPartyException("errorValidatingIssuerPolicy", e);
        }

        return validated;
    }
View Full Code Here

        // Get the RelyingParty Service to update security policy with keystore information
        service = config.getService(RP_SERVICE_NAME);
        if (service == null) {
            String msg = RP_SERVICE_NAME + " is not available in the Configuration Context";
            log.error(msg);
            throw new RelyingPartyException(msg);
        }

        // Create a Rampart Config with default crypto information
        Policy rampartConfig = IdentityBaseUtil.getDefaultRampartConfig();
        // Add the RampartConfig to service policy
View Full Code Here

                validated = false;
            } else {
                validated = true;
            }
        } catch (Exception e) {
            throw new RelyingPartyException("errorValidatingIssuerPolicy", e);
        }

        return validated;
    }
View Full Code Here

        }

        public void run() {
            try {
                MessageContext msgCtx = ((Axis2MessageContext) synCtx).getAxis2MessageContext();
                Event<MessageContext> event = new Event(msgCtx);
                subscriptions = subscriptionManager.getMatchingSubscriptions(event);
            } catch (EventException e) {
                handleException("Matching subscriptions fetching error", e);
            }
View Full Code Here

     * @throws EventException event
     */
    private void processGetStatusRequest(MessageContext mc,
                                         ResponseMessageBuilder messageBuilder)
            throws AxisFault, EventException {
        Subscription subscription =
                SubscriptionMessageBuilder.createGetStatusMessage(mc);
        if (log.isDebugEnabled()) {
            log.debug("GetStatus request recived for SynapseSubscription ID : " +
                    subscription.getId());
        }
        subscription = subscriptionManager.getSubscription(subscription.getId());
        if (subscription != null) {
            if (log.isDebugEnabled()) {
                log.debug("Sending GetStatus responce for SynapseSubscription ID : " +
                        subscription.getId());
            }
            //send the responce
            SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE,
                    mc, false);
View Full Code Here


    public SynapseSubscription() {
        this.setId(UIDGenerator.generateURNString());
        this.setDeliveryMode(EventingConstants.WSE_DEFAULT_DELIVERY_MODE);
        SubscriptionData subscriptionData = new SubscriptionData();
        subscriptionData.setProperty(SynapseEventingConstants.STATIC_ENTRY, "false");
        this.setSubscriptionData(subscriptionData);
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.identity.relyingparty.RelyingPartyException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.