org.zbus.mq.server.auth.DefaultAuth Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zbus Show documentation
Show all versions of zbus Show documentation
lightweight message queue, service bus
package org.zbus.mq.server.auth;
public class DefaultAuth implements Auth{
private String accessToken = "";
public DefaultAuth(String accessToken){
if(accessToken == null){
accessToken = "";
}
this.accessToken = accessToken;
}
@Override
public boolean auth(String appid, String token) {
if(token == null) token = ""; //null assumed to be empty
return accessToken.equals(token);
}
public void setAccessToken(String accessToken) {
if(accessToken == null){ //null assumed to be empty
accessToken = "";
}
this.accessToken = accessToken;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy