Package org.keycloak.protocol.oidc
Class OIDCClientSecretConfigWrapper
java.lang.Object
org.keycloak.protocol.oidc.AbstractClientConfigWrapper
org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper
- Author:
- Marcelo Sales
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassRepresentation of a client model that passes information from a rotated secret. -
Field Summary
Fields inherited from class org.keycloak.protocol.oidc.AbstractClientConfigWrapper
clientModel, clientRep -
Method Summary
Modifier and TypeMethodDescriptionfromClientModel(ClientModel client) fromClientRepresentation(ClientRepresentation clientRep) getClientRotatedSecret(KeycloakSession session) Returns the rotated client secret value without vault resolution.getClientRotatedSecret(KeycloakSession session, boolean resolveVault) Returns the rotated client secret value, optionally resolving vault expressions.longlonglonglonggetId()getName()booleanbooleanbooleanbooleanbooleanvoidvoidvoidsetClientRotatedSecret(String secret) voidvoidsetClientRotatedSecretCreationTime(Long rotatedTime) voidsetClientRotatedSecretExpirationTime(Long expiration) voidsetClientSecretAuthenticationAllowedMethod(String clientSecretAuthenticationAllowedMethod) voidvoidsetClientSecretCreationTime(long creationTime) voidsetClientSecretExpirationTime(Long expiration) toJson()toRotatedClientModel(KeycloakSession session) voidbooleanvalidateRotatedSecret(KeycloakSession session, String secret) booleanvalidateSecret(KeycloakSession session, String secret) Methods inherited from class org.keycloak.protocol.oidc.AbstractClientConfigWrapper
getAttribute, getAttribute, getAttributeMultivalued, getAttributes, setAttribute, setAttributeMultivalued
-
Method Details
-
fromClientModel
-
fromClientRepresentation
public static OIDCClientSecretConfigWrapper fromClientRepresentation(ClientRepresentation clientRep) -
getSecret
-
getId
-
getName
-
getClientSecretAuthenticationAllowedMethod
-
setClientSecretAuthenticationAllowedMethod
public void setClientSecretAuthenticationAllowedMethod(String clientSecretAuthenticationAllowedMethod) -
removeClientSecretRotationInfo
public void removeClientSecretRotationInfo() -
removeClientSecretRotated
public void removeClientSecretRotated() -
getClientSecretCreationTime
public long getClientSecretCreationTime() -
setClientSecretCreationTime
public void setClientSecretCreationTime(long creationTime) -
hasRotatedSecret
public boolean hasRotatedSecret() -
getClientRotatedSecret
Returns the rotated client secret value without vault resolution. Vault expressions should not be resolved when returning secrets through the Admin API to avoid leaking sensitive vault-backed values. UsehasRotatedSecret()to check whether a rotated secret is effectively present before calling this method. -
getClientRotatedSecret
Returns the rotated client secret value, optionally resolving vault expressions. Vault resolution should only be enabled for authentication validation, never for returning values through the Admin API to avoid leaking sensitive vault-backed values. UsehasRotatedSecret()to check whether a rotated secret is effectively present before calling this method.- Parameters:
session- the keycloak sessionresolveVault- iftrue, vault expressions like${vault.key}are resolved to their actual values; iffalse, the raw stored value (potentially a vault placeholder) is returned
-
setClientRotatedSecret
-
getClientRotatedSecretCreationTime
public long getClientRotatedSecretCreationTime() -
setClientRotatedSecretCreationTime
-
setClientSecretCreationTime
public void setClientSecretCreationTime() -
setClientRotatedSecretCreationTime
public void setClientRotatedSecretCreationTime() -
updateClientRepresentationAttributes
-
hasClientSecretExpirationTime
public boolean hasClientSecretExpirationTime() -
getClientSecretExpirationTime
public long getClientSecretExpirationTime() -
setClientSecretExpirationTime
-
isClientSecretExpired
public boolean isClientSecretExpired() -
getClientRotatedSecretExpirationTime
public long getClientRotatedSecretExpirationTime() -
setClientRotatedSecretExpirationTime
-
hasClientRotatedSecretExpirationTime
public boolean hasClientRotatedSecretExpirationTime() -
isClientRotatedSecretExpired
public boolean isClientRotatedSecretExpired() -
validateSecret
-
validateRotatedSecret
-
toJson
-
toRotatedClientModel
public OIDCClientSecretConfigWrapper.ReadOnlyRotatedSecretClientModel toRotatedClientModel(KeycloakSession session) throws InvalidObjectException - Throws:
InvalidObjectException
-