diff options
Diffstat (limited to 'id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java')
-rw-r--r-- | id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java | 86 |
1 files changed, 81 insertions, 5 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java index 8f75a357c..b7da86db7 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java @@ -1,15 +1,42 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ package at.gv.egovernment.moa.id.configuration.auth; import java.util.Date; +import at.gv.egovernment.moa.id.configuration.helper.DateTimeHelper; + public class AuthenticatedUser { private boolean isAuthenticated = false; private boolean isAdmin = false; + private boolean isPVP2Login = false; + private boolean isMandateUser = false; private long userID; private String givenName; private String familyName; + private String institute; private String userName; private Date lastLogin; @@ -17,18 +44,26 @@ public class AuthenticatedUser { } - public AuthenticatedUser(long userID, String givenName, String familyName, String userName, - boolean isAuthenticated, boolean isAdmin) { + public AuthenticatedUser(long userID, String givenName, String familyName, String institute, + String userName, boolean isAuthenticated, boolean isAdmin, boolean isMandateUser, + boolean isPVP2Login) { this.familyName = familyName; this.givenName = givenName; this.userName = userName; this.userID = userID; + this.institute = institute; this.isAdmin = isAdmin; this.isAuthenticated = isAuthenticated; + this.isMandateUser = isMandateUser; + this.isPVP2Login = isPVP2Login; this.lastLogin = new Date(); } + public String getFormatedLastLogin() { + return DateTimeHelper.getDateTime(lastLogin); + } + /** * @return the isAuthenticated */ @@ -105,7 +140,7 @@ public class AuthenticatedUser { public Date getLastLogin() { return lastLogin; } - + /** * @param lastLogin the lastLogin to set */ @@ -126,8 +161,49 @@ public class AuthenticatedUser { public void setUserName(String userName) { this.userName = userName; } + + /** + * @return the institute + */ + public String getInstitute() { + return institute; + } + + /** + * @param institute the institute to set + */ + public void setInstitute(String institute) { + this.institute = institute; + } + + /** + * @return the isPVP2Login + */ + public boolean isPVP2Login() { + return isPVP2Login; + } + + /** + * @param isPVP2Login the isPVP2Login to set + */ + public void setPVP2Login(boolean isPVP2Login) { + this.isPVP2Login = isPVP2Login; + } + + /** + * @return the isMandateUser + */ + public boolean isMandateUser() { + return isMandateUser; + } + + /** + * @param isMandateUser the isMandateUser to set + */ + public void setMandateUser(boolean isMandateUser) { + this.isMandateUser = isMandateUser; + } - - + } |