Package org.restlet.security
Class Realm
java.lang.Object
org.restlet.security.Realm
- Direct Known Subclasses:
MemoryRealm
Security realm capable of providing an enroler and a verifier.
- Author:
- Jerome Louvel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an enroler that can add the user roles based on user principals.getName()Returns the name.Returns the modifiable series of parameters.Returns a verifier that can check the validity of the credentials associated to a request.booleanIndicates if the realm is started.booleanIndicates if the realm is stopped.voidsetEnroler(Enroler enroler) Sets an enroler that can add the user roles based on user principals.voidSets the name.voidsetParameters(Series<Parameter> parameters) Sets the modifiable series of parameters.voidsetVerifier(Verifier verifier) Sets a verifier that can check the validity of the credentials associated to a request.voidstart()Starts the realm.voidstop()Stops the realm.toString()
-
Constructor Details
-
Realm
public Realm()Constructor. -
Realm
Constructor.- Parameters:
verifier- The verifier that can check the validity of the credentials associated to a request.enroler- The enroler that can add the user roles based on user principals.
-
-
Method Details
-
getEnroler
Returns an enroler that can add the user roles based on user principals.- Returns:
- An enroler.
-
getName
Returns the name.- Returns:
- The name.
-
getParameters
Returns the modifiable series of parameters. A parameter is a pair composed of a name and a value and is typically used for configuration purpose, like Java properties. Note that multiple parameters with the same name can be declared and accessed.- Returns:
- The modifiable series of parameters.
-
getVerifier
Returns a verifier that can check the validity of the credentials associated to a request.- Returns:
- A verifier.
-
isStarted
public boolean isStarted()Indicates if the realm is started.- Returns:
- True if the realm is started.
-
isStopped
public boolean isStopped()Indicates if the realm is stopped.- Returns:
- True if the realm is stopped.
-
setEnroler
Sets an enroler that can add the user roles based on user principals.- Parameters:
enroler- An enroler.
-
setName
Sets the name.- Parameters:
name- The name.
-
setParameters
Sets the modifiable series of parameters. This method clears the current series and adds all entries in the parameter series.- Parameters:
parameters- A series of parameters.
-
setVerifier
Sets a verifier that can check the validity of the credentials associated to a request.- Parameters:
verifier- A local verifier.
-
start
Starts the realm.- Throws:
Exception
-
stop
Stops the realm.- Throws:
Exception
-
toString
-