io.antmedia.security.MockTokenService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ant-media-server Show documentation
Show all versions of ant-media-server Show documentation
Ant Media Server supports RTMP, RTSP, MP4, HLS, WebRTC, Adaptive Streaming, etc.
package io.antmedia.security;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.red5.server.api.scope.IScope;
import org.red5.server.api.stream.IStreamPublishSecurity;
import io.antmedia.datastore.db.types.Token;
public class MockTokenService implements IStreamPublishSecurity, ITokenService{
Map authenticatedMap = new ConcurrentHashMap<>();
public boolean checkToken(String tokenId, String streamId, String sessionId, String type) {
return true;
}
@Override
public boolean isPublishAllowed(IScope scope, String name, String mode, Map queryParams) {
return true;
}
@Override
public Token createToken(String streamId, long exprireDate, String type) {
return null;
}
@Override
public Map getAuthenticatedMap() {
return authenticatedMap;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy