logo

Paleta - Deixe coloridošŸŽØ

Palette — Construtor visual de pĆ”ginas. NĆ£o precisa ser designer.

Demonstração ao vivo Baixar Palette

Scroll
13/06/2025, by Ivan

PHP 8 introduced constructor property promotion, a feature that simplifies class property definition and assignment by letting you declare and initialize properties in the constructor signature. This tutorial demonstrates how to use constructor property promotion in Drupal custom modules (which require PHP 8.0+), specifically to simplify dependency injection in your services and controllers. We will compare the traditional Drupal pattern (used in PHP 7 and early Drupal 9) with the modern PHP 8+ approach, using full code examples for both.

11/06/2025, by Ivan

Frequentemente nos deparamos com a pÔgina de erro 500 quando o Drupal, serviços ou outros sites não estão disponíveis. Quando vemos uma pÔgina de erro 500 (ou 501-504). No Drupal usamos Exceptions para verificar que algum código crítico foi executado. Se ocorrer um erro, por exemplo em uma requisição HTTP a outro site, o Drupal mostrarÔ este erro: "O site encontrou um erro inesperado. Tente novamente mais tarde":

11/04/2025, by Ivan

Authentication for CRUD Operations with JSON:API

When interacting with the JSON:API, tools such as Postman or cURL can be used to send requests. By default, requests made through these tools are treated as coming from an "anonymous" user, since they do not inherently manage user authentication. As a result, access to certain resources may be restricted based on the permissions configured for anonymous users in your Drupal site.

11/04/2025, by Ivan

Se vocĆŖ procura proteger/restringir o acesso Ć s suas APIs REST do Drupal usando seu provedor de identidade, entĆ£o vocĆŖ deve escolher o mĆ©todo de autenticação por Provedor de Identidade Externo. 

Drupal API Authentication using an External Identity Provider involves the use of tokens received from third-party providers like Google, Azure AD, Keycloak, Okta, Gitlab, etc. for accessing Drupal rest APIs securely.

11/04/2025, by Ivan

The Drupal API Authentication module works by sending a JWT token along with your API requests for authentication. This module uses JSON Web Token (JWT), an open standard for securely representing user identity during two-party interactions.

In this step, essentially, a username and password of your Drupal site are used to first get a JWT token. Once the username and password are verified, the Drupal REST API Authentication module will create a signed JSON Web Token. Then, the API will return that token back to the client application.

11/04/2025, by Ivan

OAuth (Open Authorization) is an open standard for token-based authentication and authorization protocol that can be used to provide single sign-on (SSO). OAuth allows particular information about an end user's account to be used by third-party services, such as Facebook, etc without exposing the user's password. It acts as an intermediary on behalf of the end user, providing the service with an access token that authorizes specific account information to be shared.