Package org.opensaml.security.credential

# Interface MutableCredential

All Superinterfaces:
  `Credential`

All Known Implementing Classes:
  `BasicCredential`, `BasicKeyAgreementCredential`, `BasicX509Credential`

public interface MutableCredential extends Credential
A specialization of `Credential` which supports mutation of its properties.

## Method Summary

Modifier and Type
Method
Description
`void`
`setEntityId(String newEntityID)`
Sets the ID of the entity this credential is for.
`void`
`setPrivateKey(PrivateKey newPrivateKey)`
Sets the private key for this credential.
`void`
`setPublicKey(PublicKey newPublicKey)`
Sets the public key for this credential.
`void`
`setSecretKey(SecretKey newSecretKey)`
Sets the secret key for this credential.
`void`
`setUsageType(UsageType newUsageType)`
Sets the usage type for this credential.

### Methods inherited from interface org.opensaml.security.credential.Credential

`getCredentialContextSet, getCredentialType, getEntityId, getKeyNames, getPrivateKey, getPublicKey, getSecretKey, getUsageType`

## Method Details

### setEntityId

void setEntityId(@Nullable String newEntityID)
Sets the ID of the entity this credential is for.

Parameters:
  `newEntityID` - ID of the entity this credential is for

### setUsageType

void setUsageType(@Nonnull UsageType newUsageType)
Sets the usage type for this credential.

Parameters:
  `newUsageType` - usage type for this credential

### setPublicKey

void setPublicKey(@Nonnull PublicKey newPublicKey)
Sets the public key for this credential.

Parameters:
  `newPublicKey` - public key for this credential

### setPrivateKey

void setPrivateKey(@Nonnull PrivateKey newPrivateKey)
Sets the private key for this credential.

Parameters:
  `newPrivateKey` - private key for this credential

### setSecretKey

void setSecretKey(@Nonnull SecretKey newSecretKey)
Sets the secret key for this credential.

Parameters:
  `newSecretKey` - secret key for this credential