public class SaslRoleTokenSigner extends Object
| Constructor and Description |
|---|
SaslRoleTokenSigner(byte[] secret)
Creates a SaslRoleTokenSigner instance using the specified secret.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
computeSignature(String str)
Returns the signature of a string.
|
String |
sign(String str)
Returns a signed string.
|
String |
verifyAndExtract(String signedStr)
Verifies a signed string and extracts the original string.
|
public SaslRoleTokenSigner(byte[] secret)
secret - secret to use for creating the digest.public String sign(String str)
str - string to sign.public String verifyAndExtract(String signedStr) throws AuthenticationException
signedStr - the signed string to verify and extract.AuthenticationException - thrown if the given string is not a signed string or if the signature is invalid.Copyright © 2017–2021 Apache Software Foundation. All rights reserved.