Skip to content

Commit

Permalink
WFLY-3590 Add ability to turn off proactive authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed May 18, 2015
1 parent 834354a commit 007b366
Show file tree
Hide file tree
Showing 18 changed files with 702 additions and 9 deletions.
2 changes: 1 addition & 1 deletion appclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>jboss-metadata-appclient</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion build-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
<groupId>org.jboss.metadata</groupId>
<artifactId>metadata-build-config</artifactId>
<name>Metadata Build Configuration</name>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</project>
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>jboss-metadata-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>jboss-metadata-ear</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>jboss-metadata-ejb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion permissions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>jboss-metadata-permissions</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>

<name>JBoss Application Server: Metadata Aggregator</name>
<description>JBoss Application Server: Metadata Aggregator</description>
Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>jboss-metadata-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-as-parent-metadata</artifactId>
<version>9.0.1.Final-SNAPSHOT</version>
<version>10.0.0.Beta1-SNAPSHOT</version>
</parent>

<artifactId>jboss-metadata-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,8 @@ else if (original != null && original.getVersion() != null)
if(override != null && override.getDefaultEncoding() != null) {
dest.setDefaultEncoding(override.getDefaultEncoding());
}
if(override != null && !override.isProactiveAuthentication()) {
dest.setProactiveAuthentication(override.isProactiveAuthentication());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public enum Element {
OVERLAY("overlay"),

PARAM("param"),
PROACTIVE_AUTHENTICATION("proactive-authentication"),

REPLICATION_CONFIG("replication-config"),
REPLICATION_GRANULARITY("replication-granularity"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public static JBossWebMetaData parse(XMLStreamReader reader, PropertyReplacer pr
case JBOSS_WEB_8_0:
wmd = new JBoss80WebMetaData();
break;
case JBOSS_WEB_10_0:
wmd = new JBoss80WebMetaData();
break;
}

// Handle attributes
Expand Down Expand Up @@ -269,6 +272,9 @@ public static JBossWebMetaData parse(XMLStreamReader reader, PropertyReplacer pr
case EXECUTOR_NAME:
wmd.setExecutorName(getElementText(reader, propertyReplacer));
break;
case PROACTIVE_AUTHENTICATION:
wmd.setProactiveAuthentication(Boolean.parseBoolean(getElementText(reader, propertyReplacer)));
break;
default: {
if (DEPRECATED_ELEMENTS.contains(localName)) {
log.warnf("<%s/> is no longer supported and will be ignored", localName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class Location {
bindings.put("http://www.jboss.org/j2ee/schema/jboss-web_7_0.xsd", Version.JBOSS_WEB_7_0);
bindings.put("http://www.jboss.org/j2ee/schema/jboss-web_7_1.xsd", Version.JBOSS_WEB_7_1);
bindings.put("http://www.jboss.org/j2ee/schema/jboss-web_8_0.xsd", Version.JBOSS_WEB_8_0);
bindings.put("http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd", Version.JBOSS_WEB_10_0);
}

public static Version getVersion(String location) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ public enum Version {
JBOSS_WEB_6_0, JBOSS_WEB_7_0,
JBOSS_WEB_7_1,
JBOSS_WEB_8_0,
JBOSS_WEB_10_0,
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ public class JBossWebMetaData extends NamedModuleImpl {

private String defaultEncoding;

/**
* If Undertow should always attempt to authenticate if credentials are present
*/
private boolean proactiveAuthentication = true;


public static final int SESSION_COOKIES_DEFAULT = 0;
public static final int SESSION_COOKIES_ENABLED = 1;
Expand Down Expand Up @@ -809,4 +814,12 @@ public String getDefaultEncoding() {
public void setDefaultEncoding(String defaultEncoding) {
this.defaultEncoding = defaultEncoding;
}

public boolean isProactiveAuthentication() {
return proactiveAuthentication;
}

public void setProactiveAuthentication(boolean proactiveAuthentication) {
this.proactiveAuthentication = proactiveAuthentication;
}
}
Loading

0 comments on commit 007b366

Please sign in to comment.