@Test public void testExternalSuccess() throws Exception { String testMethodName = name.getMethodName(); JdbcRealm realm = realmMap.get(testMethodName); createDefaultSchema(testMethodName, true); realm.setSaltStyle(JdbcRealm.SaltStyle.EXTERNAL); Subject.Builder builder = new Subject.Builder(securityManager); Subject currentUser = builder.buildSubject(); UsernamePasswordToken token = new UsernamePasswordToken(username, plainTextPassword); currentUser.login(token); currentUser.logout(); }
public void setSaltStyle(SaltStyle saltStyle) { this.saltStyle = saltStyle; if (saltStyle == SaltStyle.COLUMN && authenticationQuery.equals(DEFAULT_AUTHENTICATION_QUERY)) { authenticationQuery = DEFAULT_SALTED_AUTHENTICATION_QUERY; } }
JdbcRealm extends AuthorizingRealm { public void setSaltStyle(SaltStyle saltStyle) { this.saltStyle = saltStyle; if (saltStyle == SaltStyle.COLUMN && authenticationQuery.equals(DEFAULT_AUTHENTICATION_QUERY)) { authenticationQuery = DEFAULT_SALTED_AUTHENTICATION_QUERY; } } }
JdbcRealm extends AuthorizingRealm { public void setSaltStyle(SaltStyle saltStyle) { this.saltStyle = saltStyle; if (saltStyle == SaltStyle.COLUMN && authenticationQuery.equals(DEFAULT_AUTHENTICATION_QUERY)) { authenticationQuery = DEFAULT_SALTED_AUTHENTICATION_QUERY; } }  }
JdbcRealm extends AuthorizingRealm { public void setSaltStyle(SaltStyle saltStyle) { this.saltStyle = saltStyle; if (saltStyle == SaltStyle.COLUMN && authenticationQuery.equals(DEFAULT_AUTHENTICATION_QUERY)) { authenticationQuery = DEFAULT_SALTED_AUTHENTICATION_QUERY; } }  void setDataSource(DataSource dataSource); void setAuthenticationQuery(String authenticationQuery); void setUserRolesQuery(String userRolesQuery); void setPermissionsQuery(String permissionsQuery); void setPermissionsLookupEnabled(boolean permissionsLookupEnabled); void setSaltStyle(SaltStyle saltStyle); void setSaltIsBase64Encoded(boolean saltIsBase64Encoded); }
JdbcRealm extends AuthorizingRealm { public void setSaltStyle(SaltStyle saltStyle) { this.saltStyle = saltStyle; if (saltStyle == SaltStyle.COLUMN && authenticationQuery.equals(DEFAULT_AUTHENTICATION_QUERY)) { authenticationQuery = DEFAULT_SALTED_AUTHENTICATION_QUERY; } }  void setDataSource(DataSource dataSource); void setAuthenticationQuery(String authenticationQuery); void setUserRolesQuery(String userRolesQuery); void setPermissionsQuery(String permissionsQuery); void setPermissionsLookupEnabled(boolean permissionsLookupEnabled); void setSaltStyle(SaltStyle saltStyle); void setSaltIsBase64Encoded(boolean saltIsBase64Encoded);  }