/* (non-Javadoc) * @see org.sakaiproject.user.api.AuthenticationManager#authenticate(org.sakaiproject.user.api.Evidence) */ public Authentication authenticate(Evidence e) throws AuthenticationException { if (e != null && e instanceof IdPwEvidence) { IdPwEvidence evidence = (IdPwEvidence) e; String eid = evidence.getIdentifier(); if (eid == null) { log.debug("Authenticate null "); return null; } if (MockTestUser.SUPER.equals(eid)) { log.debug("Authenticate eid=[" + eid + "] as superuser"); return new org.sakaiproject.util.Authentication( MockTestUser.SUPERUSER.getId(), MockTestUser.SUPERUSER.getEid()); } if (MockTestUser.AUTH.equals(eid)) { log.debug("Authenticate eid=[" + eid + "] as auth"); return new org.sakaiproject.util.Authentication( MockTestUser.AUTHUSER.getId(), MockTestUser.AUTHUSER.getEid()); } } log.debug("Authenticate null "); return null; }
/* * (non-Javadoc) * * @see org.sakaiproject.authz.api.SecurityService#isSuperUser(java.lang.String) */ public boolean isSuperUser(String userId) { log.debug("User is super user " + userId); return MockTestUser.SUPERUSER.getId().equals(userId); }