com.tinkerpop.blueprints.impls.rexster.RexsterAuthentication Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blueprints-rexster-graph Show documentation
Show all versions of blueprints-rexster-graph Show documentation
Blueprints property graph implementation for Rexster
package com.tinkerpop.blueprints.impls.rexster;
import org.apache.commons.codec.binary.Base64;
public class RexsterAuthentication {
private final String username;
private final String password;
public RexsterAuthentication(final String username, final String password) {
this.username = username;
this.password = password;
}
public boolean isAuthenticationEnabled() {
return this.username != null && this.password != null;
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public String getAuthenticationHeaderValue() {
return "Basic " + Base64.encodeBase64URLSafeString((username + ":" + password).getBytes());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy