RoleAuthority implements Authority, AuthorityKeyStore { @Override public String getAuthenticateChallenge() { return ATHENZ_AUTH_CHALLENGE; } RoleAuthority(); @Override String getID(); @Override void initialize(); @Override String getDomain(); @Override String getHeader(); @Override String getAuthenticateChallenge(); @Override Principal authenticate(String signedToken, String remoteAddr, String httpMethod, StringBuilder errMsg); @Override void setKeyStore(KeyStore keyStore); final static String SYS_AUTH_DOMAIN; final static String ZTS_SERVICE_NAME; static final String HTTP_HEADER; static final String ATHENZ_AUTH_CHALLENGE; static final String ATHENZ_PROP_ROLE_HEADER; }
@Test public void testGetAuthenticateChallenge() { RoleAuthority roleAuthority = new RoleAuthority(); assertEquals(roleAuthority.getAuthenticateChallenge(), "AthenzRoleToken realm=\"athenz\""); }