114         String provider = 
getConfig().getAlias();
   115         String clientId = authorizedClient.getClientId();
   116         String nonce = UUID.randomUUID().toString();
   117         MessageDigest md = null;
   119             md = MessageDigest.getInstance(
"SHA-256");
   120         } 
catch (NoSuchAlgorithmException e) {
   121             throw new RuntimeException(e);
   123         String input = nonce + tokenUserSession.getId() + clientId + provider;
   124         byte[] check = md.digest(input.getBytes(StandardCharsets.UTF_8));
   125         String hash = Base64Url.encode(check);
   126         return KeycloakUriBuilder.fromUri(uriInfo.getBaseUri())
   127                 .path(
"/realms/{realm}/broker/{provider}/link")
   128                 .queryParam(
"nonce", nonce)
   129                 .queryParam(
"hash", hash)
   130                 .queryParam(
"client_id", clientId)
   131                 .build(authorizedClient.getRealm().getName(), provider)
 C getConfig()
Definition: AbstractIdentityProvider.java:55