test_class.declarator: digestAuthenticationProvider
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private DigestAuthenticationProvider digestAuthenticationProvider;
test_class.type: DigestAuthenticationProvider
test_class.var_name: digestAuthenticationProvider
test_class.declarator: oadrSecurityRoleService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private OadrSecurityRoleService oadrSecurityRoleService;
test_class.type: OadrSecurityRoleService
test_class.var_name: oadrSecurityRoleService
test_class.declarator: oadrUserService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private OadrUserService oadrUserService;
test_class.type: OadrUserService
test_class.var_name: oadrUserService
test_class.declarator: oadrAppService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private OadrAppService oadrAppService;
test_class.type: OadrAppService
test_class.var_name: oadrAppService
test_class.declarator: venService
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private VenService venService;
test_class.type: VenService
test_class.var_name: venService
test_class.declarator: vtnConfig
test_class.modifier: @Resource
  	private
test_class.original_string: @Resource
  	private VtnConfig vtnConfig;
test_class.type: VtnConfig
test_class.var_name: vtnConfig
test_class.declarator: adminUser = null
test_class.modifier: private
test_class.original_string: private OadrUser adminUser = null;
test_class.type: OadrUser
test_class.var_name: adminUser
test_class.declarator: passwordUser = null
test_class.modifier: private
test_class.original_string: private OadrUser passwordUser = null;
test_class.type: OadrUser
test_class.var_name: passwordUser
test_class.declarator: appUser = null
test_class.modifier: private
test_class.original_string: private OadrApp appUser = null;
test_class.type: OadrApp
test_class.var_name: appUser
test_class.declarator: venUser = null
test_class.modifier: private
test_class.original_string: private Ven venUser = null;
test_class.type: Ven
test_class.var_name: venUser
test_class.declarator: venX509 = null
test_class.modifier: private
test_class.original_string: private Ven venX509 = null;
test_class.type: Ven
test_class.var_name: venX509
test_class.file: OpenADRServerVTNCommon/src/test/java/com/avob/openadr/server/common/vtn/security/OadrSecurityRoleServiceTest.java
test_class.identifier: OadrSecurityRoleServiceTest
test_case.body: @Test
  	public void grantDigestRoleTest() {
  
  		String encodeDigest = oadrUserService.encodeDigest("passUser", "passUser",
  				digestAuthenticationProvider.getRealm());
  
  		User digestUserDetail = oadrSecurityRoleService.digestUserDetail("passUser");
  
  		assertEquals(digestUserDetail.getPassword(), encodeDigest);
  
  		User grantDigestRole = oadrSecurityRoleService.grantDigestRole("passUser", encodeDigest);
  
  		assertEquals(grantDigestRole.getPassword(), encodeDigest);
  
  		boolean exception = false;
  		try {
  			oadrSecurityRoleService.grantDigestRole("passUser", "passUser");
  		} catch (Exception e) {
  			exception = true;
  		}
  		assertTrue(exception);
  	}
test_case.class_method_signature: OadrSecurityRoleServiceTest.grantDigestRoleTest()
test_case.full_signature: @Test public void grantDigestRoleTest()
test_case.identifier: grantDigestRoleTest
test_case.invocations: encodeDigest getRealm digestUserDetail assertEquals getPassword grantDigestRole assertEquals getPassword grantDigestRole assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void grantDigestRoleTest()
focal_class.declarator: vtnConfig
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private VtnConfig vtnConfig;
focal_class.type: VtnConfig
focal_class.var_name: vtnConfig
focal_class.declarator: abstractUserDao
focal_class.modifier: @Resource
  	private
focal_class.original_string: @Resource
  	private AbstractUserDao abstractUserDao;
focal_class.type: AbstractUserDao
focal_class.var_name: abstractUserDao
focal_class.declarator: encoder = new BCryptPasswordEncoder()
focal_class.modifier: private
focal_class.original_string: private BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
focal_class.type: BCryptPasswordEncoder
focal_class.var_name: encoder
focal_class.file: OpenADRServerVTNCommon/src/main/java/com/avob/openadr/server/common/vtn/security/OadrSecurityRoleService.java
focal_class.identifier: OadrSecurityRoleService
focal_class.class_method_signature: OadrSecurityRoleService.digestUserDetail(String username)
focal_class.full_signature: public User digestUserDetail(String username)
focal_class.identifier: digestUserDetail
focal_class.modifiers: public
focal_class.parameters: (String username)
focal_class.return: User
focal_class.signature: User digestUserDetail(String username)
focal_class.class_method_signature: OadrSecurityRoleService.grantDigestRole(String username, String password)
focal_class.full_signature: public User grantDigestRole(String username, String password)
focal_class.identifier: grantDigestRole
focal_class.modifiers: public
focal_class.parameters: (String username, String password)
focal_class.return: User
focal_class.signature: User grantDigestRole(String username, String password)
focal_class.class_method_signature: OadrSecurityRoleService.grantBasicRole(String username, CharSequence rawPassword)
focal_class.full_signature: public User grantBasicRole(String username, CharSequence rawPassword)
focal_class.identifier: grantBasicRole
focal_class.modifiers: public
focal_class.parameters: (String username, CharSequence rawPassword)
focal_class.return: User
focal_class.signature: User grantBasicRole(String username, CharSequence rawPassword)
focal_class.class_method_signature: OadrSecurityRoleService.grantX509Role(String username)
focal_class.full_signature: public User grantX509Role(String username)
focal_class.identifier: grantX509Role
focal_class.modifiers: public
focal_class.parameters: (String username)
focal_class.return: User
focal_class.signature: User grantX509Role(String username)
focal_class.class_method_signature: OadrSecurityRoleService.saveFindUser(String username)
focal_class.full_signature: private AbstractUser saveFindUser(String username)
focal_class.identifier: saveFindUser
focal_class.modifiers: private
focal_class.parameters: (String username)
focal_class.return: AbstractUser
focal_class.signature: AbstractUser saveFindUser(String username)
focal_class.class_method_signature: OadrSecurityRoleService.grantRole(AbstractUser abstractUser, String password)
focal_class.full_signature: private User grantRole(AbstractUser abstractUser, String password)
focal_class.identifier: grantRole
focal_class.modifiers: private
focal_class.parameters: (AbstractUser abstractUser, String password)
focal_class.return: User
focal_class.signature: User grantRole(AbstractUser abstractUser, String password)
focal_method.body: public User grantDigestRole(String username, String password) {
  		AbstractUser abstractUser = saveFindUser(username);
  		if (!abstractUser.getDigestPassword().equals(password)) {
  			throw new BadCredentialsException("Bad credentials given for user: '" + username + "'");
  		}
  		return this.grantRole(abstractUser, abstractUser.getDigestPassword());
  	}
focal_method.class_method_signature: OadrSecurityRoleService.grantDigestRole(String username, String password)
focal_method.full_signature: public User grantDigestRole(String username, String password)
focal_method.identifier: grantDigestRole
focal_method.invocations: saveFindUser equals getDigestPassword grantRole getDigestPassword
focal_method.modifiers: public
focal_method.parameters: (String username, String password)
focal_method.return: User
focal_method.signature: User grantDigestRole(String username, String password)