package com.sssw.jbroker.api.security;
import java.util.Properties;
import org.omg.CORBA.ORB;
public interface Realm
{
/**
* Authenticate
the given principal using the provided pass phrase. If
* authentication
succeeds, return true. Otherwise, return false.
*/
boolean
authenticateBasic(String principal, byte[]
passPhrase);
/**
* Authenticate
the given principal using the provided digest and
* nonce.
The digest is an MD5 hash of {MD5 hash of the realm name,
* principal,
and the pass phrase}, and the nonce. If authentication
* succeeds,
return true. Otherwise, return false.
*/
boolean
authenticateDigest(String principal, byte[]
digest, byte[] nonce);
/**
* The realm
implementation is specified as a properties file, where the
* name of
the realm is the name of the properties file. The properties
* file can
provide other properties to initialize the realm.
*
* When a
realm is loaded by the ORB, it calls a null constructor on it
* and then
calls the initialize method. The contents of the properties
* file is
realm implementation specific.
*/
void initialize(Properties
props, ORB orb);
}
|