@Test void testBuildChallenge() { assertEquals("Bearer", TrellisUtils.buildChallenge("Bearer", "", "")); assertEquals("Basic realm=\"trellis\" scope=\"webid\"", TrellisUtils.buildChallenge("Basic", "trellis", "webid")); }
public static String buildChallenge(final String scheme, final String realm, final String scope) { final String realmParam = realm.isEmpty() ? "" : " realm=\"" + realm + "\""; final String scopeParam = scope.isEmpty() ? "" : " scope=\"" + scope + "\""; return scheme + realmParam + scopeParam; }
TrellisUtils { public static String buildChallenge(final String scheme, final String realm, final String scope) { final String realmParam = realm.isEmpty() ? "" : " realm=\"" + realm + "\""; final String scopeParam = scope.isEmpty() ? "" : " scope=\"" + scope + "\""; return scheme + realmParam + scopeParam; } }
TrellisUtils { public static String buildChallenge(final String scheme, final String realm, final String scope) { final String realmParam = realm.isEmpty() ? "" : " realm=\"" + realm + "\""; final String scopeParam = scope.isEmpty() ? "" : " scope=\"" + scope + "\""; return scheme + realmParam + scopeParam; } private  TrellisUtils(); }
TrellisUtils { public static String buildChallenge(final String scheme, final String realm, final String scope) { final String realmParam = realm.isEmpty() ? "" : " realm=\"" + realm + "\""; final String scopeParam = scope.isEmpty() ? "" : " scope=\"" + scope + "\""; return scheme + realmParam + scopeParam; } private  TrellisUtils(); static Authenticator getJwtAuthenticator(final JwtAuthConfiguration config); static WebAcService getWebacService(final TrellisConfiguration config,
            final ResourceService resourceService); static List<ContainerRequestFilter> getAuthFilters(final TrellisConfiguration config); static String buildChallenge(final String scheme, final String realm, final String scope); static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config); }
TrellisUtils { public static String buildChallenge(final String scheme, final String realm, final String scope) { final String realmParam = realm.isEmpty() ? "" : " realm=\"" + realm + "\""; final String scopeParam = scope.isEmpty() ? "" : " scope=\"" + scope + "\""; return scheme + realmParam + scopeParam; } private  TrellisUtils(); static Authenticator getJwtAuthenticator(final JwtAuthConfiguration config); static WebAcService getWebacService(final TrellisConfiguration config,
            final ResourceService resourceService); static List<ContainerRequestFilter> getAuthFilters(final TrellisConfiguration config); static String buildChallenge(final String scheme, final String realm, final String scope); static CORSConfiguration getCorsConfiguration(final TrellisConfiguration config);  }