All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.antmedia.security.MockTokenService Maven / Gradle / Ivy

Go to download

Ant Media Server supports RTMP, RTSP, MP4, HLS, WebRTC, Adaptive Streaming, etc.

There is a newer version: 2.10.0
Show newest version
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;
	}

	@Override
	public boolean checkHash(String hash, String streamId, String sessionId, String type) {

		return false;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy