issrg.utils.repository
Interface TokenLocator

All Known Implementing Classes:
ACUserEntry, EntryLocator, IssuerEntry, SimpleEntry, UserEntry

public interface TokenLocator

This interface introduces a locator for entry with the user's authorisation tokens. It can return the name of the entries in the repository where the authorisation tokens for the subject are stored. The tokens can be located either by the user name or by the issuer name and the token identifier (for example, serial number). It can also return the name of the entry, as a repository-independent name (used for domain matching).

Either of the locators can be null, but not both. The repositories will use all non-null locators to find the tokens.

To clarify the difference between TokenLocator and Entry: Entry gives the (universal) name of the entity for domain matching, whilst TokenLocator can provide (by chaining the getLocator calls on alternative locators) a list of locations where the Authorisation Tokens can be obtained from. The (universal) entry name may be different from (some of) the token locators.

Version:
1.0
Author:
A Otenko

Method Summary
 TokenLocator getAlternativeLocator()
          This method returns the alternative repository-specific locator of the Authorisation Tokens.
 Entry getEntry()
          This method returns the name of the entry the object locates.
 java.security.Principal getLocator()
          This method returns the main repository-specific locator of the Authorisation Tokens.
 AttributeRepository getRepository()
          This method returns the repository in which the Locator makes sense.
 

Method Detail

getEntry

Entry getEntry()
This method returns the name of the entry the object locates.

Returns:
the Entry object representing the entry name

getLocator

java.security.Principal getLocator()
This method returns the main repository-specific locator of the Authorisation Tokens.

Returns:
a principal object representing the main locator of the authorisation tokens.

getRepository

AttributeRepository getRepository()
This method returns the repository in which the Locator makes sense. May be null, if the Locator is applicable on the global scale (for example, is applicable to all the default repositories).


getAlternativeLocator

TokenLocator getAlternativeLocator()
This method returns the alternative repository-specific locator of the Authorisation Tokens. This locator may have another alternative locator, which in its turn can recursively proceed until all locators are listed. The end of the list is denoted by returning null as the alternative locator.

Returns:
a TokenLocator object representing the alternative locator of the authorisation tokens