Skip to content

v2.1.98

Compare
Choose a tag to compare
@mittwald-machine mittwald-machine released this 27 Jan 19:09
· 7 commits to master since this release

New Features

  • Introduced the OAuthClient class to manage OAuth client configurations. This class is designed to facilitate the creation and validation of OAuth client objects within the signup process.

Class Overview

OAuthClient

  • Properties:

    • allowedGrantTypes: (optional) An array of allowed grant types for the OAuth client.
    • allowedRedirectUris: (optional) An array of allowed redirect URIs.
    • allowedScopes: (optional) An array of allowed scopes for the OAuth client.
    • contributorId: (required) A string representing the ID of the contributor.
    • description: (optional) A description of the OAuth client.
    • humanReadableName: (required) A human-readable name for the OAuth client.
    • id: (required) A unique identifier for the OAuth client.
  • Methods:

    • __construct: Initializes an OAuthClient with required contributorId, humanReadableName, and id.
    • getAllowedGrantTypes, getAllowedRedirectUris, getAllowedScopes: Accessor methods for the respective properties.
    • withAllowedGrantTypes, withoutAllowedGrantTypes: Methods to set or unset allowed grant types.
    • withAllowedRedirectUris, withoutAllowedRedirectUris: Methods to set or unset allowed redirect URIs.
    • withAllowedScopes, withoutAllowedScopes: Methods to set or unset allowed scopes.
    • withContributorId, withDescription, withHumanReadableName, withId: Methods to set the respective properties with validation.
    • buildFromInput: Static method to create an OAuthClient instance from input data, with optional validation.
    • toJson: Converts the OAuthClient object to an array for JSON serialization.
    • validateInput: Validates input data against the class schema.

This new implementation enhances the management of OAuth client instances, providing a clear structure and validation mechanisms for client configurations.