java - Proxy settings in Spring security saml -
i'm learning spring security using saml. got example
https://github.com/spring-projects/spring-security-saml
i'm in network have proxy. hard find solution enter proxy details. used following in securitycontext.xml
<bean id="hostconfiguration" class="org.apache.commons.httpclient.hostconfiguration"/> <bean class="org.springframework.beans.factory.config.methodinvokingfactorybean"> <property name="targetobject" ref="hostconfiguration"/> <property name="targetmethod" value="setproxy"/> <property name="arguments"> <list> <value>proxyhost.com</value> <value>5555</value> </list> </property> </bean>
but still i'm getting connection refused error.
open connection idp.ssocircle.com:80
closing connection.
i/o exception (java.net.connectexception) caught when processing request: connection refused: connect
connection refused: connect java.net.connectexception: connection refused: connect @ java.net.dualstackplainsocketimpl.waitforconnect(native method) @ java.net.dualstackplainsocketimpl.socketconnect(dualstackplainsocketimpl.java:85) @ java.net.abstractplainsocketimpl.doconnect(abstractplainsocketimpl.java:339)`
pardon me if understanding wrong, sorry wasted time if duplicate.
you try adding following snippet configuration:
<bean id="metadatamanager" class="org.springframework.security.saml.metadata.cachingmetadatamanager"> <constructor-arg> <list> <bean class="org.opensaml.saml2.metadata.provider.httpmetadataprovider"> <constructor-arg type="java.util.timer" ref="metadatatimer"/> <constructor-arg type="org.apache.commons.httpclient.httpclient" ref="samlhttpclient"/> <constructor-arg> <value type="java.lang.string">${saml.idp.url}</value> </constructor-arg> <property name="parserpool" ref="parserpool"/> </bean> </list> </constructor-arg> </bean>
then should create samlhttpclient settings like, i.e proxy address.
Comments
Post a Comment