KEYCLOAK-12317 Fix minor warnings with modificators in packages: authentication, authorization, keys, partialimport, protocol from module "services"
This commit is contained in:
parent
c61cc1a493
commit
bb156fb2fd
8 changed files with 17 additions and 17 deletions
|
@ -137,13 +137,13 @@ public abstract class AbstractX509ClientCertificateAuthenticator implements Auth
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Function<X509Certificate[], String> getSerialnumberFunc(X509AuthenticatorConfigModel config) {
|
private static Function<X509Certificate[], String> getSerialnumberFunc(X509AuthenticatorConfigModel config) {
|
||||||
return config.isSerialnumberHex() ?
|
return config.isSerialnumberHex() ?
|
||||||
certs -> Hex.toHexString(certs[0].getSerialNumber().toByteArray()) :
|
certs -> Hex.toHexString(certs[0].getSerialNumber().toByteArray()) :
|
||||||
certs -> certs[0].getSerialNumber().toString();
|
certs -> certs[0].getSerialNumber().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Function<X509Certificate[], String> getIssuerDNFunc(X509AuthenticatorConfigModel config) {
|
private static Function<X509Certificate[], String> getIssuerDNFunc(X509AuthenticatorConfigModel config) {
|
||||||
return config.isCanonicalDnEnabled() ?
|
return config.isCanonicalDnEnabled() ?
|
||||||
certs -> certs[0].getIssuerX500Principal().getName(X500Principal.CANONICAL) :
|
certs -> certs[0].getIssuerX500Principal().getName(X500Principal.CANONICAL) :
|
||||||
certs -> certs[0].getIssuerDN().getName();
|
certs -> certs[0].getIssuerDN().getName();
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class CertificateValidator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class OCSPChecker {
|
public abstract static class OCSPChecker {
|
||||||
/**
|
/**
|
||||||
* Requests certificate revocation status using OCSP. The OCSP responder URI
|
* Requests certificate revocation status using OCSP. The OCSP responder URI
|
||||||
* is obtained from the certificate's AIA extension.
|
* is obtained from the certificate's AIA extension.
|
||||||
|
@ -147,7 +147,7 @@ public class CertificateValidator {
|
||||||
public abstract OCSPUtils.OCSPRevocationStatus check(X509Certificate cert, X509Certificate issuerCertificate) throws CertPathValidatorException;
|
public abstract OCSPUtils.OCSPRevocationStatus check(X509Certificate cert, X509Certificate issuerCertificate) throws CertPathValidatorException;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class CRLLoaderImpl {
|
public abstract static class CRLLoaderImpl {
|
||||||
/**
|
/**
|
||||||
* Returns a collection of {@link X509CRL}
|
* Returns a collection of {@link X509CRL}
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class X509AuthenticatorConfigModel extends AuthenticatorConfigModel {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
public String getName() { return this.name; }
|
public String getName() { return this.name; }
|
||||||
static public MappingSourceType parse(String name) throws IllegalArgumentException, IndexOutOfBoundsException {
|
public static MappingSourceType parse(String name) throws IllegalArgumentException, IndexOutOfBoundsException {
|
||||||
if (name == null || name.trim().length() == 0)
|
if (name == null || name.trim().length() == 0)
|
||||||
throw new IllegalArgumentException("name");
|
throw new IllegalArgumentException("name");
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,9 @@ public interface PartialImport<T> {
|
||||||
* @throws ErrorResponseException If the PartialImport can not be performed,
|
* @throws ErrorResponseException If the PartialImport can not be performed,
|
||||||
* throw this exception.
|
* throw this exception.
|
||||||
*/
|
*/
|
||||||
public void prepare(PartialImportRepresentation rep,
|
void prepare(PartialImportRepresentation rep,
|
||||||
RealmModel realm,
|
RealmModel realm,
|
||||||
KeycloakSession session) throws ErrorResponseException;
|
KeycloakSession session) throws ErrorResponseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete resources that will be overwritten. This is done separately so
|
* Delete resources that will be overwritten. This is done separately so
|
||||||
|
@ -52,7 +52,7 @@ public interface PartialImport<T> {
|
||||||
* @param realm Realm to be imported into.
|
* @param realm Realm to be imported into.
|
||||||
* @param session The KeycloakSession
|
* @param session The KeycloakSession
|
||||||
*/
|
*/
|
||||||
public void removeOverwrites(RealmModel realm, KeycloakSession session);
|
void removeOverwrites(RealmModel realm, KeycloakSession session);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create (or re-create) all the imported resources.
|
* Create (or re-create) all the imported resources.
|
||||||
|
@ -63,7 +63,7 @@ public interface PartialImport<T> {
|
||||||
* @return The final results of the PartialImport request.
|
* @return The final results of the PartialImport request.
|
||||||
* @throws ErrorResponseException if an error was detected trying to doImport a resource.
|
* @throws ErrorResponseException if an error was detected trying to doImport a resource.
|
||||||
*/
|
*/
|
||||||
public PartialImportResults doImport(PartialImportRepresentation rep,
|
PartialImportResults doImport(PartialImportRepresentation rep,
|
||||||
RealmModel realm,
|
RealmModel realm,
|
||||||
KeycloakSession session) throws ErrorResponseException;
|
KeycloakSession session) throws ErrorResponseException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ public final class DockerCertFileUtils {
|
||||||
public static final String END_CERT = "-----END CERTIFICATE-----";
|
public static final String END_CERT = "-----END CERTIFICATE-----";
|
||||||
public static final String BEGIN_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----";
|
public static final String BEGIN_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----";
|
||||||
public static final String END_PRIVATE_KEY = "-----END PRIVATE KEY-----";
|
public static final String END_PRIVATE_KEY = "-----END PRIVATE KEY-----";
|
||||||
public final static String LINE_SEPERATOR = System.getProperty("line.separator");
|
public static final String LINE_SEPERATOR = System.getProperty("line.separator");
|
||||||
|
|
||||||
private DockerCertFileUtils() {
|
private DockerCertFileUtils() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -509,8 +509,8 @@ public class SamlProtocol implements LoginProtocol {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ProtocolMapperProcessor<T> {
|
public static class ProtocolMapperProcessor<T> {
|
||||||
final public T mapper;
|
public final T mapper;
|
||||||
final public ProtocolMapperModel model;
|
public final ProtocolMapperModel model;
|
||||||
|
|
||||||
public ProtocolMapperProcessor(T mapper, ProtocolMapperModel model) {
|
public ProtocolMapperProcessor(T mapper, ProtocolMapperModel model) {
|
||||||
this.mapper = mapper;
|
this.mapper = mapper;
|
||||||
|
|
|
@ -25,5 +25,5 @@ import org.keycloak.models.ProtocolMapperModel;
|
||||||
* @version $Revision: 1 $
|
* @version $Revision: 1 $
|
||||||
*/
|
*/
|
||||||
public interface SAMLGroupNameMapper {
|
public interface SAMLGroupNameMapper {
|
||||||
public String mapName(ProtocolMapperModel model, GroupModel group);
|
String mapName(ProtocolMapperModel model, GroupModel group);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,5 +25,5 @@ import org.keycloak.models.RoleModel;
|
||||||
* @version $Revision: 1 $
|
* @version $Revision: 1 $
|
||||||
*/
|
*/
|
||||||
public interface SAMLRoleNameMapper {
|
public interface SAMLRoleNameMapper {
|
||||||
public String mapName(ProtocolMapperModel model, RoleModel role);
|
String mapName(ProtocolMapperModel model, RoleModel role);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue