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

Closes #3 group membership support w/LDAP #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.elasticsearch.plugin</groupId>
<artifactId>plugins</artifactId>
<version>2.3.1</version>
<version>2.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -121,7 +121,7 @@
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.12</version>
<scope>test</scope>
</dependency>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
package de.codecentric.elasticsearch.plugin.kerberosrealm.realm;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import org.elasticsearch.common.logging.ESLogger;
Expand All @@ -29,11 +31,20 @@ public class KerberosAuthenticationToken implements AuthenticationToken {
protected final ESLogger logger = Loggers.getLogger(this.getClass());
private byte[] outToken;
private final String principal;
private List<String> groups;

public KerberosAuthenticationToken(final byte[] outToken, final String principal) {
super();
this.outToken = Objects.requireNonNull(outToken);
this.principal = Objects.requireNonNull(principal);
this.groups = new ArrayList<String>();
}

public KerberosAuthenticationToken(final byte[] outToken, final String principal, final List<String> groups2) {
super();
this.outToken = Objects.requireNonNull(outToken);
this.principal = Objects.requireNonNull(principal);
this.groups = groups2;
}

@Override
Expand All @@ -51,6 +62,10 @@ public Object credentials() {
public String principal() {
return principal;
}

public List<String> groups() {
return this.groups;
}

@Override
public String toString() {
Expand Down
Loading