Permalink
Browse files

Fix issue #89, added auth-method option; if auth-method is basic, pre…

…-emptive authentication will be attempted.
  • Loading branch information...
ndw committed Mar 15, 2013
1 parent fd4968e commit b1fa7d5591bb7ff6548f96fd6e94cb225069361e
@@ -224,6 +224,7 @@
<p:option name="password"/>
<p:option name="content-base"/>
<p:option name="wrapper" cx:type="xsd:QName"/>
+ <p:option name="auth-method"/>
</p:declare-step>
<p:declare-step type="ml:insert-document">
@@ -240,6 +241,7 @@
<p:option name="format" cx:type="xml|text|binary"/>
<p:option name="language"/>
<p:option name="locale"/>
+ <p:option name="auth-method"/>
</p:declare-step>
<p:declare-step type="ml:invoke-module">
@@ -252,6 +254,7 @@
<p:option name="password"/>
<p:option name="content-base"/>
<p:option name="wrapper" cx:type="xsd:QName"/>
+ <p:option name="auth-method"/>
</p:declare-step>
<p:declare-step type="pos:cwd">
@@ -51,6 +51,7 @@
private static final QName _contentBase = new QName("","content-base");
private static final QName _wrapper = new QName("","wrapper");
private static final QName _encoding = new QName("encoding");
+ private static final QName _auth_method = new QName("auth-method");
private static final QName c_encoding = new QName("c", XProcConstants.NS_XPROC_STEP, "encoding");
private ReadablePipe source = null;
@@ -110,7 +111,9 @@ public void run() throws SaxonApiException {
throw new XProcException(e);
}
- contentSource.setAuthenticationPreemptive(true);
+ if ("basic".equals(getOption(_auth_method, ""))) {
+ contentSource.setAuthenticationPreemptive(true);
+ }
Session session;
@@ -48,6 +48,7 @@
private static final QName _locale = new QName("","locale");
private static final QName _uri = new QName("","uri");
private static final QName _encoding = new QName("encoding");
+ private static final QName _auth_method = new QName("auth-method");
private ReadablePipe source = null;
private WritablePipe result = null;
@@ -172,7 +173,9 @@ public void run() throws SaxonApiException {
throw new XProcException(e);
}
- contentSource.setAuthenticationPreemptive(true);
+ if ("basic".equals(getOption(_auth_method, ""))) {
+ contentSource.setAuthenticationPreemptive(true);
+ }
Session session;
@@ -41,6 +41,8 @@
private static final QName _contentBase = new QName("","content-base");
private static final QName _wrapper = new QName("","wrapper");
private static final QName _module = new QName("","module");
+ private static final QName _auth_method = new QName("auth-method");
+
private WritablePipe result = null;
private Hashtable<QName,String> params = new Hashtable<QName, String> ();
@@ -91,7 +93,9 @@ public void run() throws SaxonApiException {
throw new XProcException(e);
}
- contentSource.setAuthenticationPreemptive(true);
+ if ("basic".equals(getOption(_auth_method, ""))) {
+ contentSource.setAuthenticationPreemptive(true);
+ }
Session session;

0 comments on commit b1fa7d5

Please sign in to comment.