Class CredentialScopeModelUtils

java.lang.Object
org.keycloak.protocol.oid4vc.utils.CredentialScopeModelUtils

public class CredentialScopeModelUtils extends Object
  • Method Details

    • findCredentialScopeModelByConfigurationId

      public static CredentialScopeModel findCredentialScopeModelByConfigurationId(RealmModel realmModel, Supplier<Stream<ClientScopeModel>> supplier, String credConfigId)
    • findCredentialScopeModelByName

      public static CredentialScopeModel findCredentialScopeModelByName(RealmModel realmModel, Supplier<Stream<ClientScopeModel>> supplier, String scope)
    • buildOID4VCAuthorizationDetail

      public static OID4VCAuthorizationDetail buildOID4VCAuthorizationDetail(CredentialScopeModel credScope, String credOffersId)
    • getCredentialDisplayName

      public static String getCredentialDisplayName(KeycloakSession session, UserModel user, CredentialScopeModel credScope)
      Return display name of the credential according to preferred locale of current user and according to "vc.display" attribute specified for current OID4VCI client scope. Will fallback to client scope name if client scope does not contain "vc.display" or if "vc.display" is incorrectly formatted
      Parameters:
      session - Keycloak session
      user - user
      credScope - OID4VCI client scope
      Returns:
      user-friendly name of the VC localized in the preference of the current user