Package org.wso2.carbon.identity.base

Examples of org.wso2.carbon.identity.base.IdentityException


    OpenIDAxAttribute axAttribute = null;

    if (attribute == null || attribute.trim().length() == 0 || namespace == null
        || namespace.trim().length() == 0) {
      throw new IdentityException("invalidInputParams");
    }

    axAttribute = new OpenIDAxAttribute(attribute, namespace);

    for (Object element : claims) {
      if (element instanceof OpenIDAxAttribute) {
        OpenIDAxAttribute attr = (OpenIDAxAttribute) element;
        if (attr.getAttributeName().equalsIgnoreCase(attribute)
            || attr.getNamespace().equalsIgnoreCase(namespace)) {
          throw new IdentityException("duplicatedAttributes");
        }
      }
    }

    if (!requestTypes.contains(IdentityConstants.OpenId.ATTRIBUTE_EXCHANGE)) {
View Full Code Here


   * @throws RelyingPartyException
   */
  private void addClaims(String attribute, List<String> claims) throws IdentityException {

    if (attribute == null || attribute.trim().length() == 0) {
      throw new IdentityException("invalidInputParams");
    }
    if (claims.contains(attribute)) {
      throw new IdentityException("duplicatedAttributes");
    }
    if (!requestTypes.contains(IdentityConstants.OpenId.SIMPLE_REGISTRATION)) {
      requestTypes.add(IdentityConstants.OpenId.SIMPLE_REGISTRATION);
    }

View Full Code Here

    } catch (MessageException e) {
      log
          .error(
              "Error while adding retrieved user attributes to the session in OpenIDSimpleReg",
              e);
      throw new IdentityException(
          "Error while adding retrieved user attributes to the session in OpenIDSimpleReg",
          e);
    }
  }
View Full Code Here

          }
        }
      }
    } catch (MessageException e) {
      log.error("Error while creating the message extension for OpenIDAttributeExchange", e);
      throw new IdentityException(
          "Error while creating the message extension for OpenIDAttributeExchange", e);
    }

    return fetchReq;
  }
View Full Code Here

    } catch (MessageException e) {
      log
          .error(
              "Error while adding retrieved user attributes to the session in OpenIDAttributeExchange",
              e);
      throw new IdentityException(
          "Error while adding retrieved user attributes to the session in OpenIDAttributeExchange",
          e);
    }
    }
View Full Code Here

        }
      }
    } catch (MessageException e) {
      log.error("Error while adding retrieved user attributes to the session in OpenIDPape",
          e);
      throw new IdentityException(
          "Error while adding retrieved user attributes to the session in OpenIDPape", e);
    }
  }
View Full Code Here

                    return ((CertDataDetail) certData).getCertificate();
                }
            }
        } catch (Exception e) {
            log.error("Error occured while reading certificate from the user trusted key store", e);
            throw new IdentityException(
                    "Error occured while reading certificate from the user trusted key store", e);
        }
        return null;
    }
View Full Code Here

            ConsumerFactory factory = new ConsumerFactory(new InMemoryConsumerAssociationStore());
            consumerHelper = factory.getConsumerHelper();
        } catch (Exception e) {
            log.error("Relying Party initialization failed", e);
            // Present error to the user
            throw new IdentityException("Relying Party initialization failed", e);
        }

    }
View Full Code Here

     */
    public String doOpenIDAuthentication(OpenIDAuthenticationRequest request)
            throws IdentityException {

        if (request == null)
            throw new IdentityException("Invalid OpenID authentication request");

        if (request.getReturnUrl() == null)
            request.setReturnUrl((String) request.getRequest().getParameter("returnUrl"));

        if (log.isDebugEnabled()) {
View Full Code Here

                discovered);
        if (authResponse.getAuthResultType() == AuthResponseHelper.ResultType.AUTH_SUCCESS) {
            return authResponse.getAuthResponse();
        } else {
            log.error("OpenID verification failed");
            throw new IdentityException("OpenID verification failed");
        }

    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.identity.base.IdentityException

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.