code: @FFDCIgnore({ SocialLoginException.class })
      @Override
      public PublicKey getPublicKey() throws SocialLoginException {
          if (this.jsseHelper == null) {
              init();
          }
          if (sslKeyStoreName != null) {
              if (keyAliasName != null && keyAliasName.trim().isEmpty() == false) {
                  KeyStoreService keyStoreService = keyStoreServiceRef.getService();
                  if (keyStoreService == null) {
                      throw new SocialLoginException("KEYSTORE_SERVICE_NOT_FOUND", null, new Object[0]);
                  }
                  // TODO: Determine if the first public key should be used if a public key is not found for the key alias.
                  try {
                      return keyStoreService.getCertificateFromKeyStore(sslKeyStoreName, keyAliasName).getPublicKey();
                  } catch (GeneralSecurityException e) {
                      throw new SocialLoginException("ERROR_LOADING_CERTIFICATE", e, new Object[] { keyAliasName, sslTrustStoreName, e.getLocalizedMessage() });
                  }
              } else {
                  Iterator<Entry<String, PublicKey>> publicKeysIterator = null;
                  try {
                      // Get first public key
                      publicKeysIterator = getPublicKeys().entrySet().iterator();
                  } catch (SocialLoginException e) {
                      throw new SocialLoginException("ERROR_LOADING_GETTING_PUBLIC_KEYS", e, new Object[] { keyAliasName, sslTrustStoreName, e.getLocalizedMessage() });
                  }
                  if (publicKeysIterator.hasNext()) {
                      return publicKeysIterator.next().getValue();
                  }
              }
          }
          return null;
      }
docs: {@inheritDoc}