@Test public void testSuccessfulLogin() { WebCertUser user = (WebCertUser) testee .loadUserBySAML(new SAMLCredential(mock(NameID.class), assertionPrivatlakare, REMOTE_ENTITY_ID, LOCAL_ENTITY_ID)); assertNotNull(user); assertFalse(user.isSekretessMarkerad()); assertEquals(expectedPreferences, user.getAnvandarPreference()); verify(avtalService, times(1)).userHasApprovedLatestAvtal(anyString()); }
@Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } } }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }  }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }  @Override Object loadUserBySAML(SAMLCredential samlCredential); }
ElegWebCertUserDetailsService extends BaseWebCertUserDetailsService implements SAMLUserDetailsService { @Override public Object loadUserBySAML(SAMLCredential samlCredential) { try { return createUser(samlCredential); } catch (Exception e) { if (e instanceof AuthenticationException) { throw e; } LOG.error("Error building user with error message {}", e.getMessage()); throw new HsaServiceException("privatlakare, ej hsa", e); } }  @Override Object loadUserBySAML(SAMLCredential samlCredential);  }