public class PrincipalKeyCredential extends Object implements Credential
Constructor and Description |
---|
PrincipalKeyCredential()
Creates an empty PrincipalKeyCredential
|
PrincipalKeyCredential(String principal,
char[] key)
Creates a new PrincipalKeyCredential
|
PrincipalKeyCredential(String principal,
String key)
Creates a new PrincipalKeyCredential
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static PrincipalKeyCredential |
fromValue(String value)
Renders a new PrincipalKeyCredential from its value representation
|
char[] |
getKey() |
String |
getPrincipal() |
int |
hashCode() |
static boolean |
isValidValue(String value) |
void |
setKey(char[] key) |
void |
setPrincipal(String principal) |
char[] |
toValue()
Returns a value representation of this PrincipalKeyCredential
|
public PrincipalKeyCredential()
public PrincipalKeyCredential(String principal, String key)
principal
- a String containing the principal name for this credentialkey
- a String containing the secret key for this credentialpublic PrincipalKeyCredential(String principal, char[] key)
principal
- a String containing the principal name for this credentialkey
- a char array containing the secret key for this credentialpublic String getPrincipal()
public void setPrincipal(String principal)
principal
- a String containing the principal name for this credentialpublic char[] getKey()
public void setKey(char[] key)
key
- a char array containing the secret key for this credentialpublic char[] toValue()
toValue
in interface Credential
public static PrincipalKeyCredential fromValue(String value) throws InvalidCredentialValueException
value
- a String containing the value representation of this PrincipalKeyCredentialInvalidCredentialValueException
public static boolean isValidValue(String value)
Copyright © 2022 Apache Software Foundation. All rights reserved.