skill-auth-php

Implement RBAC, CSRF protection, and session management for PHP applications.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/claudioborja/biblioteca --skill skill-auth-php
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-auth-php
Source: https://github.com/claudioborja/biblioteca/tree/main/.agents/skills/skill-auth-php
Command: npx skills add https://github.com/claudioborja/biblioteca --skill skill-auth-php

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This workflow skill provides robust authentication, authorization and security mechanics for pure PHP applications, enabling secure login, RBAC, CSRF protection, and audit logging.

Core Features & Use Cases

  • Role-based access control (RBAC) for Admin, Librarian, Member, and Guest
  • Session-based authentication with secure password hashing and remember-me support
  • CSRF protection, secure headers, and input sanitization
  • Password reset flow with secure tokens and audit trails
  • Use Case: Integrate into a library management system to protect admin actions and user data.

Quick Start

Install the skill, wire up AuthService and CSRF protection, and secure routes with role-based permissions.

Frequently Asked Questions about skill-auth-php

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement role-based access control and session management in a vanilla PHP application?

You implement role-based access control and session management in a vanilla PHP application by wiring up an AuthService, enforcing role permissions for Admin, Librarian, Member, and Guest, and regenerating sessions securely upon login.

What is the best way to add CSRF protection and password hashing in PHP?

The best way to add CSRF protection and password hashing in PHP is to use password_hash and password_verify for credentials, generate CSRF tokens for forms, and apply explicit fail-closed safe defaults for invalid requests.

Does this PHP authentication toolkit support login rate limiting and remember-me functionality?

Yes, this PHP authentication toolkit supports login rate limiting to prevent brute-force attacks and provides secure remember-me functionality to persist user sessions safely across visits without compromising security.

Can I use this PHP RBAC toolkit for a library management system?

Yes, you can use this PHP RBAC toolkit for a library management system, as it provides specific role definitions for Admin, Librarian, Member, and Guest to protect administrative actions and user data effectively.

How does audit logging work with a PHP password reset flow?

Audit logging in a PHP password reset flow works by generating secure tokens for resetting passwords and recording an audit trail of the entire process to track credential changes and maintain security accountability.

Why should I regenerate session IDs during PHP authentication?

You should regenerate session IDs during PHP authentication to prevent session fixation attacks, ensuring that a user's session identifier is updated and secured immediately after a successful login attempt.