Download the PHP package waventra/laravel-identity without Composer
On this page you can find all versions of the php package waventra/laravel-identity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waventra/laravel-identity
More information about waventra/laravel-identity
Files in waventra/laravel-identity
Package laravel-identity
Short Description Laravel identity package for users, teams, roles, and permissions, with JWT authentication via waventra/laravel-jwt-token.
License proprietary
Homepage https://github.com/waventra/laravel-identity
Informations about the package laravel-identity
Waventra Laravel Identity
Stable version 1.0.0.
Laravel identity package for users, teams, roles, and permissions, with authentication through waventra/laravel-jwt-token. Independent of any host application.
Attach HasIdentity to your user model. Login, refresh, and logout are issued as JWT access and rotating refresh tokens. Roles, permissions, and teams sit on top of that user.
Install: composer require waventra/laravel-identity:^1.0
Packagist: packagist.org/packages/waventra/laravel-identity
Source: github.com/waventra/laravel-identity
Requirements
- PHP 8.2+
- Laravel 10, 11, or 12
waventra/laravel-jwt-token^1.0(pulled in automatically)
Installation
Laravel auto-discovers the service provider and Identity facade.
Migrations load automatically. Publish them only if you want copies in your app.
Setup
Add the trait to your authenticatable model:
HasIdentity includes JWT helpers (issueJwt(), revokeAllJwtTokens()) and custom claims for email, current team, roles, and permissions.
Point the package at that model in config/identity.php (or IDENTITY_USER_MODEL):
Register the JWT guard in config/auth.php if Identity did not already add it:
Generate JWT keys (RS256) or a secret (HS256) as documented in waventra/laravel-jwt-token:
Authentication
Identity registers these routes (disable with identity.auth.routes = false):
| Method | Path | Auth |
|---|---|---|
POST |
/api/auth/login |
Public |
POST |
/api/auth/refresh |
Refresh token |
GET |
/api/auth/me |
jwt.auth |
POST |
/api/auth/logout |
jwt.auth |
POST |
/api/auth/logout-all |
jwt.auth |
The response is a JWT token pair plus the identity user:
Protect routes with the JWT middleware from laravel-jwt-token, then identity roles:
Roles and permissions
posts.* matches posts.edit. * matches every permission. Users with the super-admin role skip permission checks.
Laravel Gates are wired automatically for permissions that exist:
Middleware
Pipe-separated names mean any.
Blade
Teams
Roles and permissions can be global or limited to a team:
When a current team is set (or Identity::setTeam() is used), checks use that team. Global roles still apply inside a team when identity.teams.include_global is true.
Artisan
| Command | Purpose |
|---|---|
identity:create-role {name} |
Create a role |
identity:create-permission {name} |
Create a permission |
identity:assign-role {email} {role} |
Assign a role (--team= optional) |
identity:create-team {name} --owner= |
Create a team |
identity:super-admin {email} |
Create or promote a super-admin |
identity:cache-reset |
Flush the identity cache |
Configuration
| Key | Default | Purpose |
|---|---|---|
defaults.guard |
web |
Guard stored on roles and permissions |
super_admin_role |
super-admin |
Role that bypasses permission checks (null to disable) |
teams.enabled |
true |
Team membership and team-scoped roles |
teams.include_global |
true |
Global roles apply inside a team |
wildcard |
true |
posts.* and * matching |
cache.ttl |
3600 |
Seconds (0 disables cache) |
auth.routes |
true |
Register /api/auth/* JWT routes |
auth.prefix |
api/auth |
Auth route prefix |
auth.guard |
api |
Laravel guard using the jwt driver |
auth.include_roles_in_token |
true |
Put roles and permissions in JWT claims |
Tables are prefixed with identity_ so they do not collide with other packages.
Events
RoleAssigned, RoleRemoved, PermissionAssigned, TeamCreated, TeamMemberAdded, TeamMemberRemoved.
Path repository (local package)
Copyright and license
Copyright (c) 2026 Waventra. All rights reserved.
This software is free to use. You may not copy, modify, or sell it.
See LICENSE for the full terms.
All versions of laravel-identity with dependencies
illuminate/auth Version ^10.0|^11.0|^12.0
illuminate/cache Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/contracts Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/events Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/view Version ^10.0|^11.0|^12.0
waventra/laravel-jwt-token Version ^1.0