Module bus.vortex

Class Principal

java.lang.Object
org.miaixz.bus.vortex.magic.Principal

public class Principal extends Object
Represents an authentication token and its associated context. This class encapsulates all necessary information for authorizing and processing a request, including the token string, the source channel, related resource configurations, and transient runtime data like tenant ID and API key.
Since:
Java 17+
Author:
Justubborn
  • Field Details

    • id

      protected String id
      The identifier for the tenant in a multi-tenant architecture. This field is marked as transient to prevent it from being included in serialization, as it's typically used for runtime request routing and context, not for persistent state.
    • type

      protected Integer type
      类型 1.token 2. apiKey
    • value

      protected String value
      根据type确定是token还是apiKey
    • channel

      protected Integer channel
      An integer identifier for the source channel of the request. This can be used to differentiate between various clients or platforms, such as a mobile app, web application, or third-party integrations (e.g., WeChat, DingTalk). It is a required, immutable field.
    • assets

      protected Assets assets
      Contains configuration and information about the resources or "assets" associated with this token. This could include permissions, rate limits, or other service-specific settings. It is a required, immutable field.
  • Constructor Details

    • Principal

      public Principal()