public static void encode(char[] string, org.wildfly.common.bytes.ByteStringBuilder target, long profile) { encode(new String(string), target, profile); }
@Deprecated public static void encode(char[] string, ByteStringBuilder target, long profile) { encode(new String(string), target, profile); }
private String getPasswordFromPasswordChars(char[] passwordChars) { final ByteStringBuilder b = new ByteStringBuilder(); StringPrep.encode(passwordChars, b, StringPrep.PROFILE_SASL_STORED); Arrays.fill(passwordChars, (char) 0); // Wipe out the password return new String(b.toArray(), StandardCharsets.UTF_8); }
final ByteStringBuilder b = new ByteStringBuilder(); if (authorizationId != null) { StringPrep.encode(authorizationId, b, StringPrep.PROFILE_SASL_STORED); StringPrep.encode(name, b, StringPrep.PROFILE_SASL_STORED); b.append((byte) 0); StringPrep.encode(password, b, StringPrep.PROFILE_SASL_STORED); return b.toArray(); } catch (IllegalArgumentException ex) {
StringPrep.encode(name, b, 0 | StringPrep.MAP_TO_NOTHING | StringPrep.MAP_TO_SPACE
StringPrep.encode(authorizationId, encoded, StringPrep.PROFILE_SASL_STORED | StringPrep.MAP_SCRAM_LOGIN_CHARS); StringPrep.encode(name, encoded, StringPrep.PROFILE_SASL_STORED | StringPrep.MAP_SCRAM_LOGIN_CHARS); encoded.append(',').append('r').append('='); final byte[] nonce = ScramUtil.generateNonce(48, getRandom());
} else { ByteStringBuilder bsb = new ByteStringBuilder(); StringPrep.encode(authorizationID, bsb, StringPrep.PROFILE_SASL_QUERY | StringPrep.UNMAP_SCRAM_LOGIN_CHARS); authorizationID = new String(bsb.toArray(), StandardCharsets.UTF_8);
if (authorizationId != null) { header.append("a="); StringPrep.encode(authorizationId, header, StringPrep.PROFILE_SASL_STORED | StringPrep.MAP_GS2_LOGIN_CHARS);
public OAuth2InitialClientMessage getInitialResponse() throws AuthenticationMechanismException { final CredentialCallback credentialCallback = new CredentialCallback(BearerTokenCredential.class); try { MechanismUtil.handleCallbacks(log, this.callbackHandler, credentialCallback); } catch (UnsupportedCallbackException e) { throw log.mechCallbackHandlerUnsupportedCallback(e); } assertTrue(credentialCallback.isCredentialTypeSupported(BearerTokenCredential.class)); final String token = credentialCallback.applyToCredential(BearerTokenCredential.class, BearerTokenCredential::getToken); if (token == null) { throw log.mechNoTokenGiven(); } final ByteStringBuilder encoded = new ByteStringBuilder(); encoded.append("n").append(","); if (this.authorizationId != null) { encoded.append('a').append('='); StringPrep.encode(this.authorizationId, encoded, StringPrep.PROFILE_SASL_STORED | StringPrep.MAP_SCRAM_LOGIN_CHARS); } encoded.append(",").append(KV_DELIMITER).append("auth").append("=").append("Bearer").append(" ").append(token).append(KV_DELIMITER); return new OAuth2InitialClientMessage(null, null, encoded.toArray()); }
if (getAuthorizationId() != null) { b2.append("a="); StringPrep.encode(getAuthorizationId(), b2, StringPrep.PROFILE_SASL_STORED | StringPrep.MAP_SCRAM_LOGIN_CHARS); if (getAuthorizationId() != null) { b2.append("a="); StringPrep.encode(getAuthorizationId(), b2, StringPrep.PROFILE_SASL_STORED | StringPrep.MAP_SCRAM_LOGIN_CHARS);
StringPrep.encode(bi.delimitedBy(',').asUtf8String().drainToString(), bsb, StringPrep.PROFILE_SASL_QUERY | StringPrep.UNMAP_SCRAM_LOGIN_CHARS); authenticationName = new String(bsb.toArray(), StandardCharsets.UTF_8);
public static void encode(char[] string, org.wildfly.common.bytes.ByteStringBuilder target, long profile) { encode(new String(string), target, profile); }
public static void encode(char[] string, org.wildfly.common.bytes.ByteStringBuilder target, long profile) { encode(new String(string), target, profile); }
public static void encode(char[] string, org.wildfly.common.bytes.ByteStringBuilder target, long profile) { encode(new String(string), target, profile); }
@Deprecated public static void encode(char[] string, ByteStringBuilder target, long profile) { encode(new String(string), target, profile); }
@Deprecated public static void encode(char[] string, ByteStringBuilder target, long profile) { encode(new String(string), target, profile); }
private String getPasswordFromPasswordChars(char[] passwordChars) { final ByteStringBuilder b = new ByteStringBuilder(); StringPrep.encode(passwordChars, b, StringPrep.PROFILE_SASL_STORED); Arrays.fill(passwordChars, (char) 0); // Wipe out the password return new String(b.toArray(), StandardCharsets.UTF_8); }
private String getPasswordFromPasswordChars(char[] passwordChars) { final ByteStringBuilder b = new ByteStringBuilder(); StringPrep.encode(passwordChars, b, StringPrep.PROFILE_SASL_STORED); Arrays.fill(passwordChars, (char) 0); // Wipe out the password return new String(b.toArray(), StandardCharsets.UTF_8); }
private String getPasswordFromPasswordChars(char[] passwordChars) { final ByteStringBuilder b = new ByteStringBuilder(); StringPrep.encode(passwordChars, b, StringPrep.PROFILE_SASL_STORED); Arrays.fill(passwordChars, (char) 0); // Wipe out the password return new String(b.toArray(), StandardCharsets.UTF_8); }