![JAR search and dependency download from the Maven repository](/logo.png)
com.migratorydata.extensions.authorization.MigratoryDataSubscribeRequest Maven / Gradle / Ivy
/// @cond
package com.migratorydata.extensions.authorization;
/// @endcond
import com.migratorydata.extensions.authorization.MigratoryDataEntitlementListener.ClientCredentials;
import java.util.List;
/**
* Represent am authorization request for subscription.
*/
public interface MigratoryDataSubscribeRequest {
/**
* Provides the credentials of the client.
*
* @return the credentials of the client.
*/
ClientCredentials getClientCredentials();
/**
* Provides the list of subjects to be authorized for subscription.
*
* @return the subjects to be subscribed.
*/
List getSubjects();
/**
* Allows or denies the subscribe authorization request.
*
* This method should be used to authorize the subscription for each subject in the list provided by {@link #getSubjects()}.
*
* @param subject the subject of the list provided by {@link #getSubjects()} to be authorized for subscription.
* @param allowed true
if the client with the credentials provided by {@link #getClientCredentials()}
* is allowed to subscribe to the subject defined by the first argument, and false
otherwise.
*/
void setAllowed(String subject, boolean allowed);
/**
* Send the response for the authorization request back to the server to allow or deny the subscribed subjects.
*
* This method must be called after the subjects have been authorized using the method MigratoryDataSubscribeRequest.setAllowed().
*/
void sendResponse();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy