Package org.wso2.carbon.identity.provider

Examples of org.wso2.carbon.identity.provider.IdentityProviderException


        try {
            message = Message.createMessage(params);
        } catch (MessageException e) {
            log.error(e.getMessage());
            throw new IdentityProviderException(e.getMessage(), e);
        }

        token = new OpenIDInfoCardToken(message);
        rdt.setText(token.getToken());
        if (log.isDebugEnabled())
View Full Code Here


        inContext = data.getInMessageContext();

        if ((results = (Vector) inContext.getProperty(WSHandlerConstants.RECV_RESULTS)) == null) {
            log.error("Missing authentication mechanism");
            throw new IdentityProviderException("Missing authentication mechanism");
        } else {
            for (int i = 0; i < results.size(); i++) {
                WSHandlerResult rResult = (WSHandlerResult) results.get(i);
                Vector wsSecEngineResults = rResult.getResults();
View Full Code Here

                    IdentityPersistenceManager manager = IdentityPersistenceManager
                            .getPersistanceManager();
                    user = manager.getUserByPPID(IdentityTenantUtil.getRegistry(null, null), ppidValue);
                } catch (Exception e) {
                    log.error(e.getMessage(), e);
                    throw new IdentityProviderException("Cannot retrieve username because "+e.getMessage(), e);
                }
               
                if (user != null) {
                    userIdentifier = user;
                    // TODO:
                    /*XMLSignature signature = null;
                     *KeyInfo keyInfo = null;
                     *signature = (XMLSignature) assertion.getNativeSignature();
                     *keyInfo = signature.getKeyInfo();
                     *
                     * if (validateKeyInfo(user, keyInfo.getElement())) { userIdentifier = user; }
                     * else { throw new IdentityProviderException("signatureInfoMismatch", new
                     * String[]{ppidValue}); }
                     */
                } else {
                    log.error("Alian PPID");
                    throw new IdentityProviderException("Alian PPID");
                }
            } else {
                log.error("Invalid SAML attribute assertion");
                throw new IdentityProviderException("Invalid SAML attribute assertio");
            }

        } else if (this.authMechanism == IdentityConstants.AUTH_TYPE_USERNAME_TOKEN) {
            userIdentifier = rahasData.getPrincipal().getName();
        } else {
            log.error("Invalid authentication mechanism");
            throw new IdentityProviderException("Invalid authentication mechanism");
        }
    }
View Full Code Here

       
        String domain = null;;
        try {
            domain = UserCoreUtil.getTenantDomain(IdentityProviderServiceComponent.getRealmService(),userIdentifier);
        } catch (UserStoreException e) {
            throw new IdentityProviderException("Invalid tenant domain");
        }
        return domain;
    }
View Full Code Here

            }
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            log.error("errorInChangingSecurityConfiguration", e);
            throw new IdentityProviderException("errorInChangingSecurityConfiguration", e);
        }

    }
View Full Code Here

                setSTSParameter(samlConfig);
            }
        } catch (Exception e) {
            log.error("Error while setting password callback to the STS", e);
            throw new IdentityProviderException(e.getMessage(), e);
        }
    }
View Full Code Here

                overrideCallbackHandler(axisConfig, IdentityConstants.SERVICE_NAME_STS_IC);
            }

        } catch (Exception e) {
            log.error("errorInChangingSecurityConfiguration", e);
            throw new IdentityProviderException("errorInChangingSecurityConfiguration", e);
        }

    }
View Full Code Here

            cert.setValue(value);
            data.getX509Certificates().add(cert);
            keyInfo.getX509Datas().add(data);
            signature.setKeyInfo(keyInfo);
        } catch (CertificateEncodingException e) {
            throw new IdentityProviderException("errorGettingCert");
        }

        assertion.setSignature(signature);
        signatureList.add(signature);
    }
View Full Code Here

            Signer.signObjects(signatureList);

        } catch (MarshallingException e) {
            log.debug(e);
            throw new IdentityProviderException("errorMarshellingOrSigning", e);
        } catch (Exception e) {
            log.debug(e);
            throw new IdentityProviderException("errorMarshellingOrSigning", e);
        }
    }
View Full Code Here

    }

    protected static XMLObject buildXMLObject(QName objectQName) throws IdentityProviderException {
        XMLObjectBuilder builder = Configuration.getBuilderFactory().getBuilder(objectQName);
        if (builder == null) {
            throw new IdentityProviderException("Unable to retrieve builder for object QName "
                    + objectQName);
        }
        return builder.buildObject(objectQName.getNamespaceURI(), objectQName.getLocalPart(),
                objectQName.getPrefix());
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.identity.provider.IdentityProviderException

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.