Skip to content
Permalink
Browse files
Merge pull request #4 from rotty3000/GERONIMO-6757
GERONIMO-6757 if we can avoid CDI.current by injecting, please do! otherwise go ahead.
  • Loading branch information
rotty3000 committed Dec 11, 2019
2 parents f75bd54 + 053be6b commit 333e960d583a3e75677e6e9747260c3a86c145cc
Showing 3 changed files with 4 additions and 4 deletions.
@@ -33,7 +33,7 @@
import org.apache.geronimo.microprofile.impl.jwtauth.io.PropertiesLoader;

@ApplicationScoped
class GroupMapper {
public class GroupMapper {
@Inject
private GeronimoJwtAuthConfig config;

@@ -82,7 +82,7 @@ private void init() {
defaultKey = config.read("public-key.default", config.read(Names.VERIFIER_PUBLIC_KEY, null));
}

String loadKey(final String property) {
public String loadKey(final String property) {
String value = keyMapping.get(property);
if (value == null) {
value = tryLoad(property);
@@ -95,7 +95,7 @@ String loadKey(final String property) {
return value;
}

Collection<String> loadIssuers(final String property) {
public Collection<String> loadIssuers(final String property) {
return issuerMapping.getOrDefault(property, defaultIssuers);
}

@@ -63,7 +63,7 @@ private void init() {
jcaProvider = config.read("jca.provider", null);
}

void verifySignature(final String alg, final String key, final String signingString, final String expected) {
public void verifySignature(final String alg, final String key, final String signingString, final String expected) {
final String normalizedAlg = alg.toLowerCase(Locale.ROOT);
if (!supportedAlgorithms.contains(normalizedAlg)) {
throw new JwtException("Unsupported algorithm", HttpURLConnection.HTTP_UNAUTHORIZED);

0 comments on commit 333e960

Please sign in to comment.