{"id":21851885,"url":"https://github.com/ulbora/default_auth","last_synced_at":"2026-05-21T05:31:18.726Z","repository":{"id":57509252,"uuid":"235918207","full_name":"Ulbora/default_auth","owner":"Ulbora","description":"Used to add default authentication module plugin to GoAuth2","archived":false,"fork":false,"pushed_at":"2020-02-01T17:34:49.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-26T13:22:06.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/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}},"created_at":"2020-01-24T01:11:37.000Z","updated_at":"2020-02-01T17:34:51.000Z","dependencies_parsed_at":"2022-08-30T07:10:44.944Z","dependency_job_id":null,"html_url":"https://github.com/Ulbora/default_auth","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/Ulbora%2Fdefault_auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fdefault_auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fdefault_auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ulbora%2Fdefault_auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ulbora","download_url":"https://codeload.github.com/Ulbora/default_auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244846724,"owners_count":20520183,"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":[],"created_at":"2024-11-28T01:12:00.188Z","updated_at":"2026-05-21T05:31:18.698Z","avatar_url":"https://github.com/Ulbora.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\nDefault authentication module used on GoAuth2\n==============\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/Ulbora/default_auth)](https://goreportcard.com/report/github.com/Ulbora/default_auth)\n\n\nCan interface with any GoAuth2 proxy for any type of authentication service. GoAuth2Users meets all of the requirements below for a GoAuth2 Proxy.\n\n### Any GoAuth2 Proxy service must meet the following requirement:\n* Must implement the login method from github.com/Ulbora/auth_interface\n```\ntype AuthInterface interface {\n\tUserLogin(login *Login) bool\n}\n```\nExample\n```\nimport( \n    au \"github.com/Ulbora/auth_interface\"    \n    px \"github.com/Ulbora/GoProxy\"\n)\n\ntype SomeAuth struct{\n    Proxy   px.Proxy\n    AuthServerURL string\n}\n\nfunc (m *SomeAuth) UserLogin(login *au.Login) bool {\n    // todo\n}\n```\n\n* The GoAuth2 Proxy must implement the code inside the \"login\" service to interface with the target authentication service.\n\n### Validate User\n```\nMethod: POST\n\nURL: http://proxyURL/rs/user/login\n```\n\n\nRequest headers Example:\n```\nContent-Type = application/json\n```\nRequest Body Example:\n```\n{\n   \"username\":\"admin\",\n   \"password\":\"admin\",\n   \"clientId\":10   \n}\n```\nResponse:\n```\n{\n    \"valid\": true,\n    \"code\": \"10\"\n}\n```\n\n\n# Usage\n\n```\n\nimport (\n\tpx \"github.com/Ulbora/GoProxy\"\n\tau \"github.com/Ulbora/auth_interface\"\n\t\"testing\"\n)\n\nvar authURL = \"http://localhost:3001/rs/user/login\"\n\nvar proxy px.GoProxy\n\nvar login au.Login\nlogin.Username = \"admin\"\nlogin.Password = \"admin\"\nlogin.ClientID = 10\n\nvar da DefaultAuth\nda.AuthServerURL = authURL\nda.Proxy = proxy.GetNewProxy()\nai := da.GetNew()\nval := ai.UserLogin(\u0026login)\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulbora%2Fdefault_auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulbora%2Fdefault_auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulbora%2Fdefault_auth/lists"}