{"id":17116468,"url":"https://github.com/dakimura/oauth2-token-chain","last_synced_at":"2025-10-19T17:50:49.039Z","repository":{"id":137757610,"uuid":"282765547","full_name":"dakimura/oauth2-token-chain","owner":"dakimura","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-27T01:44:19.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-11T04:03:30.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dakimura.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":"2020-07-27T01:29:33.000Z","updated_at":"2024-06-19T07:49:41.234Z","dependencies_parsed_at":"2024-06-19T07:59:44.000Z","dependency_job_id":null,"html_url":"https://github.com/dakimura/oauth2-token-chain","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Foauth2-token-chain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Foauth2-token-chain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Foauth2-token-chain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakimura%2Foauth2-token-chain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dakimura","download_url":"https://codeload.github.com/dakimura/oauth2-token-chain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191622,"owners_count":20575248,"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-10-14T17:48:56.163Z","updated_at":"2025-10-19T17:50:48.907Z","avatar_url":"https://github.com/dakimura.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oauth2 Token Source Chain\n\noauth2-token-chain package contains an implementation to have multiple `oauth2.TokenSource`s\n\n## Installation\n\n~~~~\ngo get \"github.com/dakimura/oauth2-token-chain/oauth2\"\n~~~~\n\nOr you can manually git clone the repository to\n`$(go env GOPATH)/src/github.com/dakimura/oauth2-token-chain`.\n\n## Usage\n\ninject some token sources for testing, caching or for some other reasons\n\n```\npackage example\n\nimport (\n\t\"github.com/dakimura/oauth2-token-chain/oauth2\"\n\tgoogleoauth2 \"golang.org/x/oauth2\"\n)\nfunc main(){\n\tchainedTokenSource := oauth2.NewChainedTokenSource(\n\t\t\u0026CachedSomeTokenSource{},\n\t\t\u0026SomeTokenSource{},\n\t\tgoogleoauth2.StaticTokenSource(\u0026googleoauth2.Token{AccessToken: \"e.g. staticAccesstokenForTest\"}),\n\t)\n\n\t// try to get token from each token source in order.\n\ttoken, err := chainedTokenSource.Token()\n\tif err != nil {\n\t\tprint(err)\n\t}\n\tprint(token)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakimura%2Foauth2-token-chain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdakimura%2Foauth2-token-chain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakimura%2Foauth2-token-chain/lists"}