use of org.springframework.security.saml.SAMLCredential in project webcert by sklintyg.
the class ElegAuthenticationAttributeHelperTest method testReadUnknownAttribute.
@Test(expected = IllegalArgumentException.class)
public void testReadUnknownAttribute() {
testee = new ElegAuthenticationAttributeHelperImpl();
SAMLCredential cred = buildLandstingslakareSamlCredential();
testee.getAttribute(cred, CgiElegAssertion.PERSON_ID_ATTRIBUTE);
}
use of org.springframework.security.saml.SAMLCredential in project webcert by sklintyg.
the class ElegWebCertUserDetailsServiceTest method testLoginPUNotFoundThrowsException.
@Test
public void testLoginPUNotFoundThrowsException() {
reset(puService);
when(puService.getPerson(any(Personnummer.class))).thenReturn(buildPersonSvar(true, PersonSvar.Status.NOT_FOUND));
thrown.expect(HsaServiceException.class);
testee.loadUserBySAML(new SAMLCredential(mock(NameID.class), assertionPrivatlakare, REMOTE_ENTITY_ID, LOCAL_ENTITY_ID));
}
Aggregations