@Entity public class SubjectImpl extends Object implements Subject, Auditable<Integer>
Subject
-implementationAuthSubject.PasswordChangePolicy
Constructor and Description |
---|
SubjectImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<Role> |
getApplicationroles(Application application)
Deprecated.
|
List<Role> |
getApplicationRoles(Application application) |
String |
getAuthName()
Returns the username of this
Account , e.g. |
@Size(max=8192,message="{validation.string.max}") String |
getDescription()
Returns the description.
|
String |
getDigest()
Returns the salted digest for this
AuthSubject . |
@Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$",message="{validation.email}") String |
getEmail()
Returns the email for this
Account , e.g. |
Date |
getExpiryDate()
The date on which the subject expires.
|
Integer |
getFailedLoginAttempts()
Returns the number of failed login attempts for this subject.
|
List<Group> |
getGroups()
|
Integer |
getId()
Returns the id.
|
@NotNull(message="{validation.notNull}") @Size(min=2,max=3,message="{validation.string.min.max}") String |
getLanguage()
Returns the language tag for this
Account in the IETF BCP
47 notation: <lang>-<country> .Examples: en en-US de de-CH |
Date |
getLastLogin()
Returns the date of the last login, if any.
|
@NotNull(message="{validation.notNull}") @Pattern(regexp="^((((CN|cn)=[^,]+),?)*(((OU|ou)=[^,]+),?)*(((DC|dc)=[^,]+),?)*)|(([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?)$",message="{validation.usernameGroup}") @Size(max=255,message="{validation.string.max}") String |
getName()
Returns the name.
|
AuthSubject.PasswordChangePolicy |
getPasswordChangePolicy()
Returns the
AuthSubject.PasswordChangePolicy for this subject |
Date |
getPasswordLastChanged()
Returns the date when the password was last changed.
|
@NotNull(message="{validation.notNull}") @Size(max=64,message="{validation.string.max}") String |
getRealname()
Returns the real name of this
Account , e.g. |
String |
getSalt()
Returns the salt for this
AuthSubject . |
String |
getTimeZone()
Returns the timezone for this
Account , e.g. |
String |
getTypeName() |
UserType |
getUserType()
Returns the
UserType . |
Date |
getVersion()
Returns the version.
|
boolean |
hasApplication(Application application)
|
int |
hashCode() |
boolean |
isAuthenticated()
Checks whether this
Subject is authenticated. |
boolean |
isAuthorized(Authorizable<?> authorizable)
Checks whether this
Subject has authorization for the given Authorizable . |
boolean |
isExpired(Date date) |
boolean |
isInactive(Date now,
Integer inactiveLockPeriod) |
boolean |
isLocked()
Whether or not the subject is locked.
|
void |
setEmail(String email) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setDigest, setPasswordChangePolicy, setPasswordLastChanged, setSalt
getAuditName
@NotNull(message="{validation.notNull}") @Pattern(regexp="^((((CN|cn)=[^,]+),?)*(((OU|ou)=[^,]+),?)*(((DC|dc)=[^,]+),?)*)|(([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?)$", message="{validation.usernameGroup}") @Size(max=255, message="{validation.string.max}") public @NotNull(message="{validation.notNull}") @Pattern(regexp="^((((CN|cn)=[^,]+),?)*(((OU|ou)=[^,]+),?)*(((DC|dc)=[^,]+),?)*)|(([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?)$",message="{validation.usernameGroup}") @Size(max=255,message="{validation.string.max}") String getName()
Nameable
@Size(max=8192, message="{validation.string.max}") public @Size(max=8192,message="{validation.string.max}") String getDescription()
Nameable
getDescription
in interface Nameable
public Integer getId()
Identifiable
getId
in interface Identifiable<Integer>
public Date getVersion()
Versionable
getVersion
in interface Versionable<Date>
@NotNull(message="{validation.notNull}") @Size(min=2, max=3, message="{validation.string.min.max}") public @NotNull(message="{validation.notNull}") @Size(min=2,max=3,message="{validation.string.min.max}") String getLanguage()
Account
Account
in the IETF BCP
47 notation: <lang>-<country>
.getLanguage
in interface Account
Locale.forLanguageTag(String)
@NotNull(message="{validation.notNull}") @Size(max=64, message="{validation.string.max}") public @NotNull(message="{validation.notNull}") @Size(max=64,message="{validation.string.max}") String getRealname()
Account
Account
, e.g. 'appNG Administrator'.getRealname
in interface Account
@Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$", message="{validation.email}") public @Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$",message="{validation.email}") String getEmail()
Account
Account
, e.g. 'admin@example.com'.public void setEmail(String email)
public String getDigest()
AuthSubject
AuthSubject
.getDigest
in interface AuthSubject
public String getSalt()
AuthSubject
AuthSubject
.getSalt
in interface AuthSubject
public UserType getUserType()
Subject
UserType
.getUserType
in interface Subject
UserType
public boolean isExpired(Date date)
public Date getExpiryDate()
Subject
getExpiryDate
in interface Subject
null
)public Date getLastLogin()
Subject
getLastLogin
in interface Subject
public Date getPasswordLastChanged()
Subject
getPasswordLastChanged
in interface Subject
public boolean isLocked()
Subject
public AuthSubject.PasswordChangePolicy getPasswordChangePolicy()
AuthSubject
AuthSubject.PasswordChangePolicy
for this subjectgetPasswordChangePolicy
in interface AuthSubject
AuthSubject.PasswordChangePolicy
for this subjectpublic Integer getFailedLoginAttempts()
Subject
getFailedLoginAttempts
in interface Subject
public boolean isAuthenticated()
Subject
Subject
is authenticated.isAuthenticated
in interface Subject
true
if this Subject
is authenticated, false
otherwisepublic boolean hasApplication(Application application)
Subject
hasApplication
in interface Subject
application
- the Application
true
if this Subject
owns at least one Role
of the the given Application
, false
otherwise@Deprecated public List<Role> getApplicationroles(Application application)
public List<Role> getApplicationRoles(Application application)
public boolean isAuthorized(Authorizable<?> authorizable)
Subject
Subject
has authorization for the given Authorizable
.isAuthorized
in interface Subject
authorizable
- the Authorizable
true
if this Subject
has authorization for the given Authorizable
, false
otherwisepublic String getTimeZone()
Account
Account
, e.g. 'Europe/Berlin'.getTimeZone
in interface Account
public String getAuthName()
Account
Account
, e.g. 'admin'.getAuthName
in interface Account
public String getTypeName()
Copyright © 2011–2023 aiticon GmbH. All rights reserved.