|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.feide.moria.authorization.AuthorizationClient
final class AuthorizationClient
Represents a web service. A web service has a name, id, url and attributes. The attributes are flattened (for optimization) from a set of profiles, allowed and denied attributes.
Field Summary | |
---|---|
private java.util.HashSet |
affiliation
The organizations that the service belongs to. |
private java.util.HashMap |
attributes
Attributes the client can query. |
private java.lang.String |
displayName
Common name of the service. |
private int |
hashCode
Cached hash code. |
private java.lang.String |
home
The organization the webservice sets as default. |
private java.lang.String |
language
Language preferred by the web service. |
private no.feide.moria.log.MessageLogger |
log
Used for logging. |
private java.lang.String |
name
Unique identifier (principal) for the client. |
private java.util.HashSet |
operations
The operations the client can perform. |
private java.util.HashSet |
orgsAllowed
The organizations that can use the service. |
private java.util.HashMap |
properties
The properties of this object. |
private java.util.HashSet |
subsystems
The subsystems the client can use proxy authentication for. |
private java.lang.String |
url
Home page URL for web service. |
Constructor Summary | |
---|---|
AuthorizationClient(java.lang.String name,
java.lang.String displayName,
java.lang.String url,
java.lang.String language,
java.lang.String home,
java.util.HashSet affiliation,
java.util.HashSet orgsAllowed,
java.util.HashSet operations,
java.util.HashSet subsystems,
java.util.HashMap attributes)
Constructor. |
Method Summary | |
---|---|
(package private) boolean |
allowAccessTo(java.lang.String[] requestedAttributes)
Checks if all the requested attributes are legal for this web service. |
(package private) boolean |
allowOperations(java.lang.String[] requestedOperations)
Returns true if all elements in the requestedOperations array are represented in the objects operations set. |
(package private) boolean |
allowSSOForAttributes(java.lang.String[] requestedAttributes)
Checks attributes for use with single sign-on (SSO). |
(package private) boolean |
allowSubsystems(java.lang.String[] requestedSubsystems)
Used to decide whether subsystems are allowed for this particular client, based on its configuration. |
(package private) boolean |
allowUserorg(java.lang.String organization)
Returns true for the organizations that are allowed to use this service. |
boolean |
equals(java.lang.Object object)
Compares object with another, returnes true if all fields are equal. |
(package private) java.util.HashSet |
getAffiliation()
Returns the affiliation for this client. |
(package private) java.util.HashMap |
getAttributes()
Returns the attributes for this client. |
java.lang.String |
getDisplayName()
Returns the display name for this client. |
java.lang.String |
getHome()
Returns the home organization for this client. |
java.lang.String |
getLanguage()
Returns the language for this client. |
java.lang.String |
getName()
Returns the principal of this client. |
protected java.lang.String[] |
getNonSSOAttributeNames()
Get the attributes not allowed for use in an SSO context for this client. |
(package private) java.util.HashSet |
getOperations()
Returns the operations for this client. |
(package private) java.util.HashSet |
getOrgsAllowed()
Returns the organizations that are allowed to use the client. |
java.util.HashMap |
getProperties()
Gets the properties for this client. |
(package private) int |
getSecLevel(java.lang.String[] requestedAttributes)
Returns the highest secLevel of the requested attributes. |
(package private) java.util.HashSet |
getSubsystems()
Returns the subsystems for this client, if any are defined. |
java.lang.String |
getURL()
Returns the URL for this client. |
(package private) boolean |
hasAffiliation(java.lang.String organization)
Returns true if the supplied organization name is affiliated with the client. |
int |
hashCode()
Generate a hash code for the object. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final no.feide.moria.log.MessageLogger log
private volatile int hashCode
private final java.lang.String name
private final java.lang.String displayName
private final java.lang.String url
private final java.lang.String language
private final java.lang.String home
private final java.util.HashSet affiliation
private final java.util.HashSet orgsAllowed
private final java.util.HashSet operations
private final java.util.HashSet subsystems
private final java.util.HashMap attributes
private final java.util.HashMap properties
Constructor Detail |
---|
AuthorizationClient(java.lang.String name, java.lang.String displayName, java.lang.String url, java.lang.String language, java.lang.String home, java.util.HashSet affiliation, java.util.HashSet orgsAllowed, java.util.HashSet operations, java.util.HashSet subsystems, java.util.HashMap attributes)
name
- serviceID The unique client ID assigned to this service.
Cannot be null
or an empty string.displayName
- Full name of the service, for display purposes. Cannot be
null
or an empty string.url
- URL to the service main page, where information on the service
should be found. Cannot be null
or an empty
string.language
- Default language for the service. Must match one of the
configured languages. Cannot be null
or an
empty string.home
- Service home organization. Must match one of the configured
organizations. Cannot be null
or an empty
string.affiliation
- The organizations affiliated to the service. Cannot be
null
.orgsAllowed
- The organizations that are allowed to use the service. Cannot
be null.operations
- Operations that the service can perform. Cannot be
null
.subsystems
- Subsystems the service can create proxy tickets for. May be
null
.attributes
- Attributes the service can access. Cannot be null
.
java.lang.IllegalArgumentException
- If any of name
,displayName
,
url
,language
,
home
,affiliation
,
allowedOrg
, operations
, or
attributes
are null
or an empty
string (where applicable).Method Detail |
---|
boolean allowAccessTo(java.lang.String[] requestedAttributes)
requestedAttributes
- Names of all requested attributes.
java.lang.IllegalArgumentException
- If requestedAttributes
is null
.boolean allowSSOForAttributes(java.lang.String[] requestedAttributes)
requestedAttributes
- The names of all requested attributes.
java.lang.IllegalArgumentException
- If requestedAttributes
is null
.protected java.lang.String[] getNonSSOAttributeNames()
null
.boolean hasAffiliation(java.lang.String organization)
organization
- Name of the organization to match.
java.lang.IllegalArgumentException
- If organization
is null
or an
empty string.boolean allowOperations(java.lang.String[] requestedOperations)
requestedOperations
- A string array of operation names
java.lang.IllegalArgumentException
- If requestedOperations
is null
.boolean allowUserorg(java.lang.String organization)
organization
- The organization requesting authorization.
java.lang.IllegalArgumentException
- If organization
is null
.boolean allowSubsystems(java.lang.String[] requestedSubsystems)
requestedSubsystems
- A string array of subsystem names. Cannot be null
.
true
if subsystems are allowed, otherwise
false
.
java.lang.IllegalArgumentException
- If requestedSubsystems
is null
.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- The object to compare with.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getURL()
public java.lang.String getName()
public java.lang.String getDisplayName()
public java.lang.String getLanguage()
public java.lang.String getHome()
java.util.HashSet getAffiliation()
java.util.HashSet getOrgsAllowed()
java.util.HashSet getOperations()
java.util.HashSet getSubsystems()
HashSet
object containing the defined
subsystems, or null
if no subsystems are defined
for this client.java.util.HashMap getAttributes()
public java.util.HashMap getProperties()
int getSecLevel(java.lang.String[] requestedAttributes) throws UnknownAttributeException
requestedAttributes
- The requested attributes.
UnknownAttributeException
- if one (or more) of the requested attributes are not present
in the authorization client.
java.lang.IllegalArgumentException
- If requestedAttributes
is null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |