Package org.openiam.idm.srvc.auth.dto
Class Subject
- java.lang.Object
-
- org.openiam.idm.srvc.auth.dto.Subject
-
- All Implemented Interfaces:
Serializable
public class Subject extends Object implements Serializable
A Subject represents a grouping of related information for a single entity, such as a person. Such information includes the Subject's identities as well as its security-related attributes (passwords and cryptographic keys, for example).
Subjects may potentially have multiple identities. Each identity is represented as a Principal within the Subject. Principals simply bind names to a Subject. For example, a Subject that happens to be a person, Alice, might have two Principals:
one which binds "Alice Bar", the name on her driver license, to the Subject, and another which binds, "999-99-9999", the number on her student identification card, to the Subject. Both Principals refer to the same Subject even though each has a different name.- Version:
- 1
- Author:
- Suneet Shah
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description boolean
readOnly
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
This method compares objects of userId.int
hashCode()
Returns hashcode for the user id.void
setExpirationTime(long expTime)
This method sets the expitarion time for the user authentication token.void
setUserId(String userId)
This method sets the user id.
-
-
-
Constructor Detail
-
Subject
public Subject(String userId)
Create an instance of a Subject The specified Sets must check whether this Subject has not been set to read-only before permitting subsequent modifications.- Parameters:
userId
-
-
-
Method Detail
-
setUserId
public void setUserId(String userId)
This method sets the user id.- Parameters:
userId
- Sets the user id.
-
setExpirationTime
public void setExpirationTime(long expTime)
This method sets the expitarion time for the user authentication token.- Parameters:
expTime
- The expiration time is set.
-
hashCode
public int hashCode()
Returns hashcode for the user id.
-
-