PHPackages                             openwod/service-accounts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. openwod/service-accounts

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

openwod/service-accounts
========================

A package for adding service accounts to a Laravel project

1.0.0(3y ago)07[1 issues](https://github.com/Openwod-com/service-accounts/issues)MITPHP

Since Nov 15Pushed 3y agoCompare

[ Source](https://github.com/Openwod-com/service-accounts)[ Packagist](https://packagist.org/packages/openwod/service-accounts)[ RSS](/packages/openwod-service-accounts/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Information
===========

[](#information)

This package makes it possible to create service accounts and assign permissions to these. The package creates a couple of routes which you can use for creating/modifing service accounts.

Authentication
--------------

[](#authentication)

All routes require authentication. There are two ways of authenticating. 1. Using the api\_token specified in service-accounts config file. (this has access to all routes) 2. By using a service account's token with the right permission.

Both types of tokens should be sent in the Authorization header, Format for service account's token "Bearer TOKEN" Format for api\_token "ServiceAccount TOKEN"

Routes
======

[](#routes)

```
POST /service_accounts
    Body:
        name
        permissions
            Comma separated list of permissions in format something.something
    Creates a new Service account
    Permission: service-accounts.create
    Returns service account token

GET /service_accounts/{name}
    Permission: service-accounts.view
    Returns information about a service account

DELETE /service_accounts/{name}
    Permission: service-accounts.destroy
    Deletes a service account

```

Install
=======

[](#install)

1.
--

[](#1)

Run composer command to download package. More information comming...

2.
--

[](#2)

### Add following to `config/auth.php` config:

[](#add-following-to-configauthphp-config)

Under `guards` add:

```
'svc' => [
	'driver' => 'sanctum',
	'provider' => 'svc',
    'hash' => true,
],
```

Under `providers` add:

```
'svc' => [
	'driver' => 'eloquent',
	'model' => Openwod\ServiceAccounts\Models\ServiceAccount::class,
],
```

3.
--

[](#3)

Add `SERVICE_ACCOUNT_ADMIN_TOKEN` to env. This token is used to authenticate requests to add new service accounts.

4.
--

[](#4)

Run `php artisan vendor:publish --provider="Openwod\ServiceAccounts\ServiceAccountsServiceProvider"` to publish files

5.
--

[](#5)

Run `php artisan migrate`

Usage
=====

[](#usage)

Get service account
-------------------

[](#get-service-account)

```
$svc = auth()->guard('svc')->user();
```

Check permission
----------------

[](#check-permission)

```
$svc->tokenCan('permission')
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1326d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/127461541?v=4)[Bingoo](/maintainers/Bingoo)[@Bingoo](https://github.com/Bingoo)

---

Top Contributors

[![RasmusWiktellSundman](https://avatars.githubusercontent.com/u/49868943?v=4)](https://github.com/RasmusWiktellSundman "RasmusWiktellSundman (7 commits)")

### Embed Badge

![Health badge](/badges/openwod-service-accounts/health.svg)

```
[![Health](https://phpackages.com/badges/openwod-service-accounts/health.svg)](https://phpackages.com/packages/openwod-service-accounts)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k6](/packages/hasinhayder-tyro)[daniel-de-wit/lighthouse-sanctum

Laravel Sanctum support for Laravel Lighthouse.

60121.5k](/packages/daniel-de-wit-lighthouse-sanctum)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[albetnov/sanctum-refresh

This package extends sanctum ability to be able to provide refresh token as well

211.7k](/packages/albetnov-sanctum-refresh)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
