{"id":16676980,"url":"https://github.com/jeckel/eloquent-signature","last_synced_at":"2026-04-21T22:04:18.933Z","repository":{"id":70148838,"uuid":"117544765","full_name":"jeckel/eloquent-signature","owner":"jeckel","description":"Add signature check on your Eloquent models","archived":false,"fork":false,"pushed_at":"2018-01-15T14:11:10.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T23:47:36.207Z","etag":null,"topics":["eloquent","laravel","security","signature"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeckel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-15T12:49:50.000Z","updated_at":"2023-06-28T20:59:50.000Z","dependencies_parsed_at":"2023-02-27T09:15:40.327Z","dependency_job_id":null,"html_url":"https://github.com/jeckel/eloquent-signature","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Feloquent-signature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Feloquent-signature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Feloquent-signature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Feloquent-signature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeckel","download_url":"https://codeload.github.com/jeckel/eloquent-signature/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243352034,"owners_count":20276916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eloquent","laravel","security","signature"],"created_at":"2024-10-12T13:24:48.406Z","updated_at":"2025-12-29T22:05:51.059Z","avatar_url":"https://github.com/jeckel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eloquent-signature\n\nAdd a signature integrity check in your Eloquent model\n\n# Installation\n\nTo get started, install secure-eloquent via Composer:\n\n```php\ncomposer require jeckel/eloquent-signature\n```\n\nNext add the `HasSignature` trait and the `Signable` interface to your model\n\n```php\n\u003c?php\nnamespace App;\n\nuse Jeckel\\EloquentSignature\\HasSignature;\nuse Jeckel\\EloquentSignature\\Signable;\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass User extends Model implements Signable\n{\n    use HasSignature;\n    \n    /**\n     * Required \n     */\n    protected static $signatureProperties = ['login', 'email', 'password'];\n    \n    /**\n     * Required   \n     */\n    protected static $signatureSalt = 'MySalt';\n    \n    /**\n     * Optional (default: 'signature')  \n     */\n    protected $signatureFieldName = 'signature';\n    \n    /**\n     * Optional (default: false) \n     */\n    protected $throwExceptionOnRetrieve = false;\n}\n```\n\nField description :\n\n- `signatureProperties`: fields which will be include in the signature check, if any of this field is updated without updating the model will cause an integrity check error\n- `signatureSalt`: String to include in the signature calculation\n- `signatureFieldName`: name of the field in your model where the calculated signature will be stored\n- `throwExceptionOnRetrieve`: if set to true, all find queries will throw an exception if the signature retrieved is invalid. Using this options is more secure but need some implementation on your side to handle this exception.\n\n\nMethods :\n\n- `checkSignatureIsValid`: allow you to check the signature when you need in your code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeckel%2Feloquent-signature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeckel%2Feloquent-signature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeckel%2Feloquent-signature/lists"}