EnterpriseIdentity class

Represents an authenticated enterprise subject (User, Service Account, or API Principal).

Constructors

EnterpriseIdentity({required String id, required String displayName, String email = '', IdentityType type = IdentityType.user, String organizationId = 'default_org', List<EnterpriseRole> roles = const [EnterpriseRole.developer], Set<String> directPermissions = const {}, Map<String, dynamic> claims = const {}, Map<String, dynamic> metadata = const {}})
const
EnterpriseIdentity.fromJson(Map<String, dynamic> json)
factory

Properties

claims → Map<String, dynamic>
final
directPermissions → Set<String>
final
displayName → String
final
email → String
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
metadata → Map<String, dynamic>
final
organizationId → String
final
roles → List<EnterpriseRole>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → IdentityType
final

Methods

hasDirectPermission(String permission) → bool
Helper to check permission existence.
hasRole(EnterpriseRole role) → bool
Helper to check role membership.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

anonymous → const EnterpriseIdentity
Represents an unauthenticated anonymous principal.