{"id":27900512,"url":"https://github.com/p4bgroup/ldap-jwt-authentication","last_synced_at":"2025-10-18T07:16:47.846Z","repository":{"id":34502805,"uuid":"179845487","full_name":"P4BGroup/ldap-jwt-authentication","owner":"P4BGroup","description":"A library to help with generating JWT tokens based on LDAP connection. ","archived":false,"fork":false,"pushed_at":"2022-03-30T13:47:38.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T20:16:54.528Z","etag":null,"topics":["jwt","jwt-authentication","ldap","ldap-authentication"],"latest_commit_sha":null,"homepage":null,"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/P4BGroup.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}},"created_at":"2019-04-06T14:45:26.000Z","updated_at":"2022-03-17T08:33:41.000Z","dependencies_parsed_at":"2022-08-08T01:01:19.749Z","dependency_job_id":null,"html_url":"https://github.com/P4BGroup/ldap-jwt-authentication","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4BGroup%2Fldap-jwt-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4BGroup%2Fldap-jwt-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4BGroup%2Fldap-jwt-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/P4BGroup%2Fldap-jwt-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/P4BGroup","download_url":"https://codeload.github.com/P4BGroup/ldap-jwt-authentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252569646,"owners_count":21769517,"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":["jwt","jwt-authentication","ldap","ldap-authentication"],"created_at":"2025-05-05T20:16:58.507Z","updated_at":"2025-10-09T12:41:13.970Z","avatar_url":"https://github.com/P4BGroup.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"P4BGroup Authentication\n---\n\nJWT Authentication service using LDAP connections for Phalcon Projects\n\n[![Latest Stable Version](https://poser.pugx.org/p4bgroup/ldap-jwt-authentication/v/stable)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication) [![License](https://poser.pugx.org/p4bgroup/ldap-jwt-authentication/license)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication)  [![Maintainability](https://api.codeclimate.com/v1/badges/69d207e90a5a0382b6a7/maintainability)](https://codeclimate.com/github/P4BGroup/ldap-jwt-authentication/maintainability) [![Total Downloads](https://poser.pugx.org/p4bgroup/ldap-jwt-authentication/downloads)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication) [![Test Coverage](https://api.codeclimate.com/v1/badges/69d207e90a5a0382b6a7/test_coverage)](https://codeclimate.com/github/P4BGroup/ldap-jwt-authentication/test_coverage) [![Build Status](https://travis-ci.com/P4BGroup/ldap-jwt-authentication.svg?branch=master)](https://travis-ci.com/P4BGroup/ldap-jwt-authentication) [![composer.lock](https://poser.pugx.org/p4bgroup/ldap-jwt-authentication/composerlock)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication)\n\nUsage\n--- \n\n```php\n$ldap = new Laminas\\Ldap\\Ldap([..]);\n$authService = new AuthenticationService($ldap);\n$jwtTokensService = new JWTTokensService($algorithm, $encodeKey, $decodeKey);\n\n/** @param P4BGroup\\Authentication\\User $user */\n$user = $authService-\u003eauthenticateUser($username, $password, $userBaseDn);\n\n$claims = new P4BGroup\\Authentication\\Claims();\n$claims-\u003esetData($user-\u003etoArray())\n-\u003esetSubject(Claims::SUBJECT_REFRESH)\n-\u003esetExpirationTime(new DateTime(\"+10 minutes\"))\n\n$accessToken = $jwtTokensService-\u003eencode($claims);\n$refreshToken = $jwtTokensService-\u003eencode($claims-\u003esetSubject(Claims::SUBJECT_REFRESH)-\u003esetExpirationTime(new DateTime(\"+1 hour\"));\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4bgroup%2Fldap-jwt-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp4bgroup%2Fldap-jwt-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp4bgroup%2Fldap-jwt-authentication/lists"}