UserAuthority implements Authority { @Override public String getAuthenticateChallenge() { return ATHENZ_AUTH_CHALLENGE; } UserAuthority(); @Override void initialize(); @Override String getID(); @Override String getDomain(); @Override String getHeader(); @Override String getAuthenticateChallenge(); @Override boolean allowAuthorization(); @Override Principal authenticate(String creds, String remoteAddr, String httpMethod, StringBuilder errMsg); static final String ATHENZ_AUTH_CHALLENGE; }
@Test public void testGetAuthenticateChallenge() { UserAuthority userAuthority = new UserAuthority(); assertEquals(userAuthority.getAuthenticateChallenge(), "Basic realm=\"athenz\""); }