CREATE TABLE password_reset_tokens (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token_hash TEXT NOT NULL,
expires_at TIMESTAMPTZ NOT NULL,
used_at TIMESTAMPTZ,
import { randomBytes } from 'crypto';
import { Request, Response, NextFunction } from 'express';
interface CspOptions {
reportOnly?: boolean;
reportUri?: string;
<?php
namespace App\Tenancy;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
const rolePermissions = {
guest: ['article:read'],
author: ['article:read', 'article:create', 'article:update:own'],
editor: ['article:publish', 'article:update:any'],
admin: ['user:manage', 'role:assign']
};
package webhooks
import (
"bytes"
"crypto/hmac"
"crypto/sha256"