{"id":30737858,"url":"https://github.com/barisyild/haxe-jwt","last_synced_at":"2026-02-13T11:30:51.708Z","repository":{"id":304624997,"uuid":"1017021072","full_name":"barisyild/haxe-jwt","owner":"barisyild","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-14T18:53:19.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T20:57:18.694Z","etag":null,"topics":["haxe","jwt"],"latest_commit_sha":null,"homepage":"","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barisyild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-09T22:46:24.000Z","updated_at":"2025-12-22T22:51:08.000Z","dependencies_parsed_at":"2025-07-14T10:49:24.523Z","dependency_job_id":"80faf512-49e3-4dda-a7a6-065f342d4c37","html_url":"https://github.com/barisyild/haxe-jwt","commit_stats":null,"previous_names":["barisyild/haxe-jwt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/barisyild/haxe-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barisyild%2Fhaxe-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barisyild%2Fhaxe-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barisyild%2Fhaxe-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barisyild%2Fhaxe-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barisyild","download_url":"https://codeload.github.com/barisyild/haxe-jwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barisyild%2Fhaxe-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29403905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["haxe","jwt"],"created_at":"2025-09-03T21:48:51.205Z","updated_at":"2026-02-13T11:30:51.688Z","avatar_url":"https://github.com/barisyild.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haxe JWT\n\nA JSON Web Token (JWT) creation and verification library for Haxe.\n\n## Features\n\n- JWT token signing\n- JWT token verification\n- Multiple algorithm support (HMAC-based)\n- Type-safe API\n- Cross-platform compatibility\n\n## Installation\n\nTo include this library in your project, you can use the source files from the src/ directory.\n\n## Usage\n\n### Creating JWT Tokens\n\n```haxe\nimport haxe.Jwt;\nimport haxe.format.JwtAlgorithm;\n\nvar payload = {user: \"root\", role: \"super\"};\nvar secret = \"supersecret\";\nvar algorithm = JwtAlgorithm.HS256; // or other supported algorithms\nvar token = Jwt.sign(payload, secret, algorithm);\n```\n\n### Verifying JWT Tokens\n\n```haxe\nimport haxe.Jwt;\nimport haxe.format.JwtAlgorithm;\n\nvar token = \"your.jwt.token\";\nvar secret = \"supersecret\";\nvar algorithm = JwtAlgorithm.HS256;\n\ntry {\n    var verifiedPayload = Jwt.verify(token, secret, algorithm);\n    trace('User: ${verifiedPayload.user}');\n} catch (e) {\n    trace('Token verification error: $e');\n}\n```\n\n## API Reference\n\n### Jwt Class\n\n#### `static function sign(payload:Dynamic, secret:String, algorithm:JwtAlgorithm):String`\n\nCreates a JWT token using the given payload.\n\n**Parameters:**\n- `payload`: Data to be embedded in the token\n- `secret`: Secret key used for signing\n- `algorithm`: Algorithm to use\n\n**Returns:** JWT token string\n\n#### `static function verify(token:String, secret:String, algorithm:JwtAlgorithm):Dynamic`\n\nVerifies a JWT token and returns the payload.\n\n**Parameters:**\n- `token`: JWT token to verify\n- `secret`: Secret key used for verification\n- `algorithm`: Expected algorithm\n\n**Returns:** Verified payload\n\n**Throws:**\n- \"Invalid token format\" - Token format is invalid\n- \"Invalid algorithm\" - Algorithm mismatch\n- \"Invalid signature\" - Signature verification failed\n\n## Supported Algorithms\n\nThe library supports HMAC-based algorithms. Based on the test files, HS256, HS384 and HS512 algorithms are supported.\n\n## Development\n\n### Running Tests\n\nTest files are located in the `tests/` directory. Tests cover:\n\n- Token creation and verification\n- Verification failure with wrong secret\n- Algorithm mismatch errors\n\n## Contributing\n\nTo contribute to this project:\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Submit a pull request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarisyild%2Fhaxe-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarisyild%2Fhaxe-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarisyild%2Fhaxe-jwt/lists"}