/** * getInstance * <p/> * Returns an instance of SAMLIssuer. This method uses the specified filename * to load a property file. This file shall use the property * <code>org.apache.ws.security.saml.issuerClass</code> * to define the classname of the SAMLIssuer implementation. The file * may contain other property definitions as well. These properties are * handed over to the SAMLIssuer implementation. The specified file * is loaded with the <code>Loader.getResource()</code> method. * <p/> * * @param propFilename The name of the property file to load * @return The SAMLIssuer implementation that was defined * @throws WSSecurityException if there is an error in loading the crypto properties */ public static SAMLIssuer getInstance(String propFilename) throws WSSecurityException { return getInstance(getProperties(propFilename)); }
/** * getInstance * <p/> * Returns an instance of SAMLIssuer. The properties are handed over the the SAMLIssuer * implementation. The properties can be <code>null</code>. It is dependent on the * SAMLIssuer implementation how the initialization is done in this case. * <p/> * * @param samlClass This is the SAMLIssuer implementation class. No default is * provided here. * @param properties The Properties that are forwarded to the SAMLIssuer implementation. * These properties are dependent on the SAMLIssuer implementation * @return The SAMLIssuer implementation or null if no samlClassName was defined * @throws WSSecurityException if there is an error in loading the crypto properties */ public static SAMLIssuer getInstance( Class<? extends SAMLIssuer> samlClass, Properties properties ) throws WSSecurityException { return loadClass(samlClass, properties); }
/** * getInstance * <p/> * Returns an instance of SAMLIssuer. This method uses the file * <code>saml.properties</code> to determine which implementation to * use. Thus the property <code>org.apache.ws.security.saml.issuerClass</code> * must define the classname of the SAMLIssuer implementation. The file * may contain other property definitions as well. These properties are * handed over to the SAMLIssuer implementation. The file * <code>saml.properties</code> is loaded with the * <code>Loader.getResource()</code> method. * <p/> * * @return The SAMLIssuer implementation was defined * @throws WSSecurityException if there is an error in loading the crypto properties */ public static SAMLIssuer getInstance() throws WSSecurityException { return getInstance("saml.properties"); }
/** * getInstance * <p/> * Returns an instance of SAMLIssuer. This method uses the file * <code>saml.properties</code> to determine which implementation to * use. Thus the property <code>org.apache.ws.security.saml.issuerClass</code> * must define the classname of the SAMLIssuer implementation. The file * may contain other property definitions as well. These properties are * handed over to the SAMLIssuer implementation. The file * <code>saml.properties</code> is loaded with the * <code>Loader.getResource()</code> method. * <p/> * * @return The SAMLIssuer implementation was defined * @throws WSSecurityException if there is an error in loading the crypto properties */ public static SAMLIssuer getInstance() throws WSSecurityException { return getInstance("saml.properties"); }
/** * getInstance * <p/> * Returns an instance of SAMLIssuer. This method uses the specified filename * to load a property file. This file shall use the property * <code>org.apache.ws.security.saml.issuerClass</code> * to define the classname of the SAMLIssuer implementation. The file * may contain other property definitions as well. These properties are * handed over to the SAMLIssuer implementation. The specified file * is loaded with the <code>Loader.getResource()</code> method. * <p/> * * @param propFilename The name of the property file to load * @return The SAMLIssuer implementation that was defined * @throws WSSecurityException if there is an error in loading the crypto properties */ public static SAMLIssuer getInstance(String propFilename) throws WSSecurityException { return getInstance(getProperties(propFilename)); }
Object obj = handler.getProperty(reqData.getMsgContext(), refId); if (obj instanceof Properties) { samlIssuer = SAMLIssuerFactory.getInstance((Properties)obj); } else if (obj instanceof SAMLIssuer) { samlIssuer = (SAMLIssuer)obj; String samlPropFile = handler.getString(WSHandlerConstants.SAML_PROP_FILE, reqData.getMsgContext()); samlIssuer = SAMLIssuerFactory.getInstance(samlPropFile);
/** * getInstance * <p/> * Returns an instance of SAMLIssuer. The properties are handed over the the SAMLIssuer * implementation. The properties can be <code>null</code>. It is dependent on the * SAMLIssuer implementation how the initialization is done in this case. * <p/> * * @param samlClass This is the SAMLIssuer implementation class. No default is * provided here. * @param properties The Properties that are forwarded to the SAMLIssuer implementation. * These properties are dependent on the SAMLIssuer implementation * @return The SAMLIssuer implementation or null if no samlClassName was defined * @throws WSSecurityException if there is an error in loading the crypto properties */ public static SAMLIssuer getInstance( Class<? extends SAMLIssuer> samlClass, Properties properties ) throws WSSecurityException { return loadClass(samlClass, properties); }
Object obj = handler.getProperty(reqData.getMsgContext(), refId); if (obj instanceof Properties) { samlIssuer = SAMLIssuerFactory.getInstance((Properties)obj); } else if (obj instanceof SAMLIssuer) { samlIssuer = (SAMLIssuer)obj; String samlPropFile = handler.getString(WSHandlerConstants.SAML_PROP_FILE, reqData.getMsgContext()); samlIssuer = SAMLIssuerFactory.getInstance(samlPropFile);
public static SAMLIssuer getInstance(Properties properties) throws WSSecurityException { String samlClassName = properties.getProperty("org.apache.ws.security.saml.issuerClass"); Class<? extends SAMLIssuer> samlIssuerClass = null; if (samlClassName == null || samlClassName.equals("org.apache.ws.security.saml.SAMLIssuerImpl")) { samlIssuerClass = DEFAULT_SAML_CLASS; } else { try { // instruct the class loader to load the crypto implementation samlIssuerClass = Loader.loadClass(samlClassName, SAMLIssuer.class); } catch (ClassNotFoundException ex) { if (LOG.isDebugEnabled()) { LOG.debug(ex.getMessage(), ex); } throw new WSSecurityException(samlClassName + " Not Found", ex); } } return loadClass(samlIssuerClass, properties); }
public static SAMLIssuer getInstance(Properties properties) throws WSSecurityException { String samlClassName = properties.getProperty("org.apache.ws.security.saml.issuerClass"); Class<? extends SAMLIssuer> samlIssuerClass = null; if (samlClassName == null || samlClassName.equals("org.apache.ws.security.saml.SAMLIssuerImpl")) { samlIssuerClass = DEFAULT_SAML_CLASS; } else { try { // instruct the class loader to load the crypto implementation samlIssuerClass = Loader.loadClass(samlClassName, SAMLIssuer.class); } catch (ClassNotFoundException ex) { if (LOG.isDebugEnabled()) { LOG.debug(ex.getMessage(), ex); } throw new WSSecurityException(samlClassName + " Not Found", ex); } } return loadClass(samlIssuerClass, properties); }