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 1mo ago

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 19% 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

1277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98f6d799fe4ec69d282a982406a9d3125ce9da82389e72074e7a0ccad7146fff?d=identicon)[Bingoo](/maintainers/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

[tuandm/laravue

A beautiful dashboard for Laravel built by VueJS

2.2k16.6k](/packages/tuandm-laravue)[hasinhayder/tyro

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

6712.1k2](/packages/hasinhayder-tyro)[ikechukwukalu/requirepin

A laravel package for pin confirmation and validation before processing requests to a specified route

24910.5k1](/packages/ikechukwukalu-requirepin)[daniel-de-wit/lighthouse-sanctum

Laravel Sanctum support for Laravel Lighthouse.

61115.9k](/packages/daniel-de-wit-lighthouse-sanctum)[mohamedgaber-intake40/sanctum-refresh-token

add refresh token feature to laravel sanctum official package

4573.9k](/packages/mohamedgaber-intake40-sanctum-refresh-token)[devtical/filament-sanctum

Laravel Sanctum integration for Filament 4

533.0k](/packages/devtical-filament-sanctum)

PHPackages © 2026

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