Class CredentialScopeUtils

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

public class CredentialScopeUtils 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)
    • getCredentialScopesForAuthorization

      public static List<CredentialScopeModel> getCredentialScopesForAuthorization(ClientModel client, AuthorizationEndpointRequest request)
      Get the list of credential scopes associated by the given and requested by the given authorization request
    • 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