{"id":21851934,"url":"https://github.com/ulbora/nodejsoauth2server","last_synced_at":"2025-07-13T17:09:03.801Z","repository":{"id":87394574,"uuid":"75896233","full_name":"Ulbora/nodeJsOauth2Server","owner":"Ulbora","description":"Oauth2 Server implementation in Node.js, enhanced JWT token, role and URL based security","archived":false,"fork":false,"pushed_at":"2018-06-23T23:57:10.000Z","size":989,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T11:47:14.635Z","etag":null,"topics":["authorization","oauth2","oauth2-server"],"latest_commit_sha":null,"homepage":"http://www.myapigateway.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ulbora.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":"2016-12-08T02:44:46.000Z","updated_at":"2018-06-23T23:57:12.000Z","dependencies_parsed_at":"2023-05-07T11:30:41.553Z","dependency_job_id":null,"html_url":"https://github.com/Ulbora/nodeJsOauth2Server","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Ulbora/nodeJsOauth2Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2FnodeJsOauth2Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2FnodeJsOauth2Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2FnodeJsOauth2Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2FnodeJsOauth2Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ulbora","download_url":"https://codeload.github.com/Ulbora/nodeJsOauth2Server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2FnodeJsOauth2Server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265175567,"owners_count":23722661,"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":["authorization","oauth2","oauth2-server"],"created_at":"2024-11-28T01:12:30.849Z","updated_at":"2025-07-13T17:09:03.771Z","avatar_url":"https://github.com/Ulbora.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=Oauth2Server\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=Oauth2Server)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=Oauth2Server\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=Oauth2Server)\n\nUlbora Oauth2 Server \n==============\n\nUlbora Oauth2 Server is an Oauth2 server implementation build on Node.js. Currently authorization code, \nimplicit, and client credentials grant types are supported.\n\n## Authorization Code Grant Type\n\n * Authorize\n\n```\n   Example\n   GET:\n\nhttp://localhost:3000/oauth/authorize?response_type=code\u0026client_id=403\u0026redirect_uri=CALLBACK_URL\u0026scope=read\u0026state=xyz\n  \n```\n\n```  \n   Test\n   GET:\n\nhttp://localhost:3000/oauth/authorize?response_type=code\u0026client_id=403\u0026redirect_uri=http://www.google.com\u0026scope=read\u0026state=xyz\n\n```\n\n * Access Token \n\n```\n   Example\n   POST:\n\nhttp://localhost:3000/oauth/token?client_id=403\u0026client_secret=554444vfg55ggfff22454sw2fff2dsfd\u0026grant_type=authorization_code\u0026code=i76y13e340akRn6Ipkdbii\u0026redirect_uri=http://www.google.com\n \n```\n\n```  \n   Test\n   POST:\n\nhttp://localhost:3000/oauth/token?client_id=403\u0026client_secret=554444vfg55ggfff22454sw2fff2dsfd\u0026grant_type=authorization_code\u0026code=i76y13e340akRn6Ipkdbii\u0026redirect_uri=http://www.google.com\n\n```\n\n * Refresh Token\n\n```\n   Example\n   POST:\n\nhttp://localhost:3000/oauth/token?grant_type=refresh_token\u0026client_id=CLIENT_ID\u0026client_secret=CLIENT_SECRET\u0026refresh_token=REFRESH_TOKEN\n   \n```\n\n``` \n   Test\n   POST:\n\nhttp://localhost:3000/oauth/token?grant_type=refresh_token\u0026client_id=403\u0026client_secret=554444vfg55ggfff22454sw2fff2dsfd\u0026refresh_token=efssffffnnlf\n\n```\n\n## Implicit Grant Type\n\n* Authorize\n\n```\n   Example\n   GET:\n\nhttp://localhost:3000/oauth/authorize?response_type=token\u0026client_id=403\u0026redirect_uri=CALLBACK_URL\u0026scope=read\u0026state=xyz\n  \n```\n\n```  \n   Test\n   GET:\n\nhttp://localhost:3000/oauth/authorize?response_type=token\u0026client_id=403\u0026redirect_uri=http://www.google.com\u0026scope=read\u0026state=xyz\n\n```\n\n\n## Client Credentials Grant Type\n\n * Access Token    \n\n```\n   Example\n   POST:\n\nhttp://localhost:3000/oauth/token?client_id=403\u0026client_secret=554444vfg55ggfff22454sw2fff2dsfd\u0026grant_type=client_credentials\n \n```\n\n```  \n   Test\n   POST:\n\nhttp://localhost:3000/oauth/token?client_id=403\u0026client_secret=554444vfg55ggfff22454sw2fff2dsfd\u0026grant_type=client_credentials\n\n```\n\n## Password Grant Type\nCurrently not supported.\n\n\n\n## Access Token Validation\n\n\n```\n   Example\n   POST:\n\nhttp://localhost:3000/rs/token/validate\n \n```\n\n```  \n   Request:\n\n{\n   \"userId\":null,\n   \"clientId\": 403,\n   \"role\":\"admin\",\n   \"url\":\"http:localhost:3000/rs/updateClient\",\n   \"scope\":null,\n   \"accessToken\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhY2Nlc3MiLCJncmFudCI6ImNsaWVudF9jcmVkZW50aWFscyIsImNsaWVudElkIjo0MDMsInJvbGVVcmlzIjpbeyJjbGllbnRSb2xlSWQiOjEsInJvbGUiOiJhZG1pbiIsInVyaUlkIjo2MywidXJpIjoiaHR0cDpsb2NhbGhvc3Q6MzAwMC9ycy91cGRhdGVDbGllbnQiLCJjbGllbnRJZCI6NDAzfSx7ImNsaWVudFJvbGVJZCI6MSwicm9sZSI6ImFkbWluIiwidXJpSWQiOjc3LCJ1cmkiOiJodHRwOmxvY2FsaG9zdDozMDAwL3JzL2FkZENsaWVudFNjb3BlIiwiY2xpZW50SWQiOjQwM30seyJjbGllbnRSb2xlSWQiOjIsInJvbGUiOiJ1c2VyIiwidXJpSWQiOjY4LCJ1cmkiOiJodHRwOmxvY2FsaG9zdDozMDAwL3JzL2RlbGV0ZUNsaWVudEFsbG93ZWRVcmkiLCJjbGllbnRJZCI6NDAzfSx7ImNsaWVudFJvbGVJZCI6Miwicm9sZSI6InVzZXIiLCJ1cmlJZCI6ODAsInVyaSI6Imh0dHA6bG9jYWxob3N0OjMwMDAvcnMvYWRkQ2xpZW50Um9sZVVyaSIsImNsaWVudElkIjo0MDN9XSwiZXhwaXJlc0luIjozNjAwMCwiaWF0IjoxNDg3NTUwNTcxLCJ0b2tlblR5cGUiOiJhY2Nlc3MiLCJleHAiOjE0ODc1ODY1NzEsImlzcyI6IlVsYm9yYSBPYXV0aDIgU2VydmVyIn0.1Isnysob52ujgYOu9Oi\"\n}\n\n\n\n```\n\n\n```  \n   Response:\n\n{\n  \"valid\": true\n}\n\n\n```\n\n# Client Micro Service\n\n\n Oauth2 Client Micro Service\n\n\n## Headers\nContent-Type: application/json (for POST and PUT)\nAuthorization: Bearer atToken\nclientId: clientId (example 33477)\n\n\n## Add Client\n\n```\nPOST:\nURL: http://localhost:3000/rs/client/add\n\nExample Request\n{\n   \"name\":\"ulbora\",\n   \"webSite\":\"www.ulboralabs.com\",\n   \"email\":\"ulbora@ulbora.com\",\n   \"enabled\":true,\n   \"redirectUrls\":[\n      {\n         \"uri\":\"http://www.google.com\",\n         \"clientId\":null\n      },\n      {\n         \"uri\":\"http://www.ulboralabs.com\",\n         \"clientId\":null\n      }\n   ]\n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n## Update Client\n\n```\nPUT:\nURL: http://localhost:3000/rs/client/update\n\nExample Request\n{\n  \"clientId\": 510,\n  \"name\": \"ulbora\",\n  \"webSite\": \"www.ulboralabs.com\",\n  \"email\": \"ulbora@ulbora.com\",\n  \"enabled\": false\n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n## Get Client\n\n```\nGET:\nURL: http://localhost:3000/rs/client/get/510\n  \n```\n\n```\nExample Response   \n\n{\n    \"id\": 94,    \n    \"clientId\": 510,\n    \"name\": \"ulbora\",\n    \"webSite\": \"www.ulboralabs.com\",\n    \"email\": \"ulbora@ulbora.com\",\n    \"enabled\": false\n\n}\n\n```\n\n\n\n## Get Client List\n\n```\nGET:\nURL: http://localhost:3000/rs/client/list\n\n  \n```\n\n```\nExample Response   \n\n[\n    {\n    \"id\": 94,    \n    \"clientId\": 510,\n    \"name\": \"ulbora\",\n    \"webSite\": \"www.ulboralabs.com\",\n    \"email\": \"ulbora@ulbora.com\",\n    \"enabled\": false\n\n    }\n]\n\n```\n\n\n\n## Delete Client\n\n```\nDELETE:\nURL: http://localhost:3000/rs/client/delete/509\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true,\n  \"message\": \"\"\n}\n\n```\n\n\n\n## Add Client Grant Type\n\n```\nPOST:\nURL: http://localhost:3000/rs/clientGrantType/add\n\nExample Request\n{\n   \"grantType\":\"code\",\n   \"clientId\":581\n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n## Get Client Grant Type\n\n```\nGET:\nURL: http://localhost:3000/rs/clientGrantType/list/581\n  \n```\n\n```\nExample Response   \n\n{\n   \"grantType\":\"code\",\n   \"clientId\":581\n}\n\n```\n\n\n\n## Delete Client Grant Type\n\n```\nDELETE:\nURL: http://localhost:3000/rs/clientGrantType/delete/221\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true,\n  \"message\": \"\"\n}\n\n```\n\n\n\n\n## Add Client Allowed URI\n\n```\nPOST:\nURL: http://localhost:3000/rs/clientAllowedUri/add\n\nExample Request\n{\n   \"uri\":\"www.ulboralabs.com\",\n   \"clientId\":616\n   \n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n## Update Client Allowed URI\n\n```\nPUT:\nURL: http://localhost:3000/rs/clientAllowedUri/update\n\nExample Request\n{\n   \"uri\":\"www.ulbora.com\",\n   \"id\":139\n   \n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n## Get Client Allowed URI\n\n```\nGET:\nURL: http://localhost:3000/rs/clientAllowedUri/get/139\n  \n```\n\n```\nExample Response   \n\n{\n   \"uri\":\"www.ulbora.com\",\n   \"id\":139\n   \n}\n\n```\n\n\n\n## Get Client Allowed URI List\n\n```\nGET:\nURL: http://localhost:3000/rs/clientAllowedUri/list/616\n\n  \n```\n\n```\nExample Response   \n\n[\n    {\n        \"uri\":\"www.ulbora.com\",\n        \"id\":139   \n    }\n]\n\n```\n\n\n\n## Delete Client Allowed URI\n\n```\nDELETE:\nURL: http://localhost:3000/rs/clientAllowedUri/delete/139\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true,\n  \"message\": \"\"\n}\n\n```\n\n\n\n\n## Add Client Redirect URI\n\n```\nPOST:\nURL: http://localhost:3000/rs/clientRedirectUri/add\n\nExample Request\n{\n   \"uri\":\"www.ulboralabs.com\",\n   \"clientId\":616\n   \n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n\n## Get Client Redirect URI List\n\n```\nGET:\nURL: http://localhost:3000/rs/clientRedirectUri/list/616\n\n  \n```\n\n```\nExample Response   \n\n[\n    {\n        \"uri\":\"www.ulbora.com\",\n        \"id\":139   \n    }\n]\n\n```\n\n\n\n## Delete Client Redirect URI\n\n```\nDELETE:\n\nURL: http://localhost:3000/rs/clientRedirectUri/delete/681\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true,\n  \"message\": \"\"\n}\n\n```\n\n\n\n\n\n## Add Client Role\n\n```\nPOST:\nURL: http://localhost:3000/rs/clientRole/add\n\nExample Request\n{\n   \"role\":\"tester2\",\n   \"clientId\":616\n   \n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n\n## Get Client Role List\n\n```\nGET:\nURL: http://localhost:3000/rs/clientRole/list/616\n\n  \n```\n\n```\nExample Response   \n\n[\n    {\n        \"role\":\"tester2\",\n        \"clientId\":616   \n    }\n]\n\n```\n\n\n\n## Delete Client Role\n\n```\nDELETE:\n\nURL: http://localhost:3000/rs/clientRole/delete/25\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true,\n  \"message\": \"\"\n}\n\n```\n\n\n\n\n## Add Client Role URI\n\n```\nPOST:\nURL: http://localhost:3000/rs/clientRoleUri/add\n\nExample Request\n{  \n   \"clientRoleId\":24,\n   \"clientAllowedUriId\":167\n}\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true, \n  \"message\": \"\"\n}\n\n```\n\n\n\n\n## Get Client Role URI List\n\n```\nGET:\nURL: http://localhost:3000/rs/clientRoleUri/list/24\n\n  \n```\n\n```\nExample Response   \n\n[\n    {  \n        \"clientRoleId\":24,\n        \"clientAllowedUriId\":167\n    }\n]\n\n```\n\n\n\n## Delete Client Role URI\n\n```\nDELETE:\n\nURL: http://localhost:3000/rs/clientRoleUri/delete\n  \n```\n\n```\nExample Response   \n\n{\n  \"success\": true,\n  \"message\": \"\"\n}\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulbora%2Fnodejsoauth2server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulbora%2Fnodejsoauth2server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulbora%2Fnodejsoauth2server/lists"}