Fix name parameter on maxAuthLifetimeAttr init
Adding back variable name parameter for maxAuthLifetimeAttr
initialization.
Otherwise gerrit repoting error:
Error injecting constructor, java.lang.NullPointerException
..
for the 2nd parameter of com.thesamet.gerrit.plugins.saml.
SamlWebFilter.<init>(SamlWebFilter.java:68)
Original-Author: Roman Shaposhnikov <arraen@arraen.org.ua>
PR: https://github.com/thesamet/gerrit-saml-plugin/pull/13
Change-Id: Ic012692baaf032881735afbd529c80b2eaefb20e
diff --git a/src/main/java/com/thesamet/gerrit/plugins/saml/SamlConfig.java b/src/main/java/com/thesamet/gerrit/plugins/saml/SamlConfig.java
index 9667849..ed0e05a 100644
--- a/src/main/java/com/thesamet/gerrit/plugins/saml/SamlConfig.java
+++ b/src/main/java/com/thesamet/gerrit/plugins/saml/SamlConfig.java
@@ -47,7 +47,7 @@
userNameAttr = getGetStringWithDefault(cfg, "userNameAttr", "UserName");
emailAddressAttr =
getGetStringWithDefault(cfg, "emailAddressAttr", "EmailAddress");
- maxAuthLifetimeAttr = cfg.getInt("saml", null, maxAuthLifetimeDefault);
+ maxAuthLifetimeAttr = cfg.getInt("saml", "maxAuthLifetime", maxAuthLifetimeDefault);
}
public String getMetadataPath() {