Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility for custom login link #26

Merged
merged 1 commit into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,11 @@ public class ReverseProxySecurityRealm extends SecurityRealm {
/**
* Custom post logout url
*/
public final String customLogInUrl;
public final String customLogOutUrl;

@DataBoundConstructor
public ReverseProxySecurityRealm(String forwardedUser, String headerGroups, String headerGroupsDelimiter, String customLogOutUrl, String server, String rootDN, boolean inhibitInferRootDN,
public ReverseProxySecurityRealm(String forwardedUser, String headerGroups, String headerGroupsDelimiter, String customLogInUrl, String customLogOutUrl, String server, String rootDN, boolean inhibitInferRootDN,
String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, String groupMembershipFilter, String groupNameAttribute, String managerDN, String managerPassword,
Integer updateInterval, boolean disableLdapEmailResolver, String displayNameLdapAttribute, String emailAddressLdapAttribute) {

Expand All @@ -285,6 +286,12 @@ public ReverseProxySecurityRealm(String forwardedUser, String headerGroups, Stri
this.headerGroupsDelimiter = "|";
}

if(!StringUtils.isBlank(customLogInUrl)) {
this.customLogInUrl = customLogInUrl;
} else {
this.customLogInUrl = null;
}

if(!StringUtils.isBlank(customLogOutUrl)) {
this.customLogOutUrl = customLogOutUrl;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ THE SOFTWARE.
<f:textbox field="headerGroupsDelimiter" default="|" />
</f:entry>
<f:advanced>
<f:entry title="${%Custom Log In URL}" >
<f:textbox name="customLogInUrl" value="${instance.customLogInUrl}" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have an associated help file as this doesn't seem like a feature with obvious behavior.

</f:entry>
<f:entry title="${%Custom Log Out URL}" >
<f:textbox name="customLogOutUrl" value="${instance.customLogOutUrl}" />
</f:entry>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<!-- no login link -->
<j:jelly xmlns:j="jelly:core" />
<j:jelly xmlns:j="jelly:core">
<j:if test="${it.customLogInUrl != null}">
<a href="${it.customLogInUrl}"><b>${%login}</b></a>
</j:if>
</j:jelly>