test_class.declarator: securityService
test_class.modifier: @Autowired private
test_class.original_string: @Autowired private SecurityService securityService;
test_class.type: SecurityService
test_class.var_name: securityService
test_class.declarator: jwtAuthenticationService
test_class.modifier: @Autowired private
test_class.original_string: @Autowired private DefaultJwtAuthenticationService jwtAuthenticationService;
test_class.type: DefaultJwtAuthenticationService
test_class.var_name: jwtAuthenticationService
test_class.declarator: MODULE = "djastModule"
test_class.modifier: private static final
test_class.original_string: private static final String MODULE = "djastModule";
test_class.type: String
test_class.var_name: MODULE
test_class.file: Realization/backend/core/core-impl/src/test/java/eu/bcvsolutions/idm/core/security/service/impl/DefaultJwtAuthenticationServiceTest.java
test_class.identifier: DefaultJwtAuthenticationServiceTest
test_class.superclass: extends AbstractEvaluatorIntegrationTest
test_case.body: @Test
  	public void createJwtAuthenticationAndAuthenticateTest() {
  		String username = getHelper().createName();
  		IdmIdentityDto identityDto = getHelper().createIdentity(username, (GuardedString) null);
  		LoginDto loginDto =  new LoginDto(identityDto.getUsername(), identityDto.getPassword());
  
  		LoginDto resultLoginDto = jwtAuthenticationService.createJwtAuthenticationAndAuthenticate(loginDto, identityDto, MODULE);
  
  		Assert.assertTrue(securityService.isAuthenticated());
  		Assert.assertEquals(username, securityService.getCurrentUsername());
  
  		Assert.assertEquals(username, resultLoginDto.getUsername());
  		Assert.assertEquals(MODULE, resultLoginDto.getAuthenticationModule());
  		Assert.assertNotNull(resultLoginDto.getToken());
  
  		IdmJwtAuthenticationDto jwtAuthenticationDto = resultLoginDto.getAuthentication();
  		Assert.assertNotNull(jwtAuthenticationDto);
  		Assert.assertEquals(username, jwtAuthenticationDto.getCurrentUsername());
  		Assert.assertEquals(MODULE, jwtAuthenticationDto.getFromModule());
  		Assert.assertTrue(resultLoginDto.getAuthorities().isEmpty());
  	}
test_case.class_method_signature: DefaultJwtAuthenticationServiceTest.createJwtAuthenticationAndAuthenticateTest()
test_case.full_signature: @Test public void createJwtAuthenticationAndAuthenticateTest()
test_case.identifier: createJwtAuthenticationAndAuthenticateTest
test_case.invocations: createName getHelper createIdentity getHelper getUsername getPassword createJwtAuthenticationAndAuthenticate assertTrue isAuthenticated assertEquals getCurrentUsername assertEquals getUsername assertEquals getAuthenticationModule assertNotNull getToken getAuthentication assertNotNull assertEquals getCurrentUsername assertEquals getFromModule assertTrue isEmpty getAuthorities
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void createJwtAuthenticationAndAuthenticateTest()
focal_class.declarator: oauthAuthenticationManager
focal_class.modifier: @Autowired private
focal_class.original_string: @Autowired private OAuthAuthenticationManager oauthAuthenticationManager;
focal_class.type: OAuthAuthenticationManager
focal_class.var_name: oauthAuthenticationManager
focal_class.declarator: jwtTokenMapper
focal_class.modifier: @Autowired private
focal_class.original_string: @Autowired private JwtAuthenticationMapper jwtTokenMapper;
focal_class.type: JwtAuthenticationMapper
focal_class.var_name: jwtTokenMapper
focal_class.file: Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/security/service/impl/DefaultJwtAuthenticationService.java
focal_class.identifier: DefaultJwtAuthenticationService
focal_class.interfaces: implements JwtAuthenticationService
focal_class.class_method_signature: DefaultJwtAuthenticationService.createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, String moduleId)
focal_class.full_signature: @Override public LoginDto createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, String moduleId)
focal_class.identifier: createJwtAuthenticationAndAuthenticate
focal_class.modifiers: @Override public
focal_class.parameters: (LoginDto loginDto, IdmIdentityDto identity, String moduleId)
focal_class.return: LoginDto
focal_class.signature: LoginDto createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, String moduleId)
focal_class.class_method_signature: DefaultJwtAuthenticationService.createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, IdmTokenDto preparedToken)
focal_class.full_signature: @Override public LoginDto createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, IdmTokenDto preparedToken)
focal_class.identifier: createJwtAuthenticationAndAuthenticate
focal_class.modifiers: @Override public
focal_class.parameters: (LoginDto loginDto, IdmIdentityDto identity, IdmTokenDto preparedToken)
focal_class.return: LoginDto
focal_class.signature: LoginDto createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, IdmTokenDto preparedToken)
focal_class.class_method_signature: DefaultJwtAuthenticationService.login(LoginDto loginDto, IdmTokenDto token)
focal_class.full_signature: private LoginDto login(LoginDto loginDto, IdmTokenDto token)
focal_class.identifier: login
focal_class.modifiers: private
focal_class.parameters: (LoginDto loginDto, IdmTokenDto token)
focal_class.return: LoginDto
focal_class.signature: LoginDto login(LoginDto loginDto, IdmTokenDto token)
focal_class.class_method_signature: DefaultJwtAuthenticationService.logout(IdmTokenDto token)
focal_class.full_signature: @Override public void logout(IdmTokenDto token)
focal_class.identifier: logout
focal_class.modifiers: @Override public
focal_class.parameters: (IdmTokenDto token)
focal_class.return: void
focal_class.signature: void logout(IdmTokenDto token)
focal_method.body: @Override
  	public LoginDto createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, String moduleId) {
  		IdmTokenDto preparedToken = new IdmTokenDto();
  		preparedToken.setModuleId(moduleId);
  		return createJwtAuthenticationAndAuthenticate(loginDto, identity, preparedToken);
  	}
focal_method.class_method_signature: DefaultJwtAuthenticationService.createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, String moduleId)
focal_method.full_signature: @Override public LoginDto createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, String moduleId)
focal_method.identifier: createJwtAuthenticationAndAuthenticate
focal_method.invocations: setModuleId createJwtAuthenticationAndAuthenticate
focal_method.modifiers: @Override public
focal_method.parameters: (LoginDto loginDto, IdmIdentityDto identity, String moduleId)
focal_method.return: LoginDto
focal_method.signature: LoginDto createJwtAuthenticationAndAuthenticate(LoginDto loginDto, IdmIdentityDto identity, String moduleId)