{"id":19040805,"url":"https://github.com/cloudfoundry/go-uaa","last_synced_at":"2026-01-12T10:01:05.405Z","repository":{"id":32613494,"uuid":"136238474","full_name":"cloudfoundry/go-uaa","owner":"cloudfoundry","description":"API for UAA written in Go","archived":false,"fork":false,"pushed_at":"2025-09-08T11:35:27.000Z","size":435,"stargazers_count":13,"open_issues_count":8,"forks_count":25,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-09-22T05:57:39.951Z","etag":null,"topics":["api","cloudfoundry","go","golang","oauth2","scim","uaa"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudfoundry.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,"zenodo":null}},"created_at":"2018-06-05T21:46:57.000Z","updated_at":"2025-08-26T06:08:25.000Z","dependencies_parsed_at":"2023-07-13T03:21:55.565Z","dependency_job_id":"db7ff320-3e7e-446d-9e61-1864bfe4e5a5","html_url":"https://github.com/cloudfoundry/go-uaa","commit_stats":null,"previous_names":["cloudfoundry-community/uaa","cloudfoundry/go-uaa","cloudfoundry-community/go-uaa"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/cloudfoundry/go-uaa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fgo-uaa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fgo-uaa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fgo-uaa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fgo-uaa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudfoundry","download_url":"https://codeload.github.com/cloudfoundry/go-uaa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fgo-uaa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"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":["api","cloudfoundry","go","golang","oauth2","scim","uaa"],"created_at":"2024-11-08T22:25:24.114Z","updated_at":"2026-01-12T10:01:05.374Z","avatar_url":"https://github.com/cloudfoundry.png","language":"Go","readme":"# `go-uaa` [![Travis-CI](https://travis-ci.org/cloudfoundry-community/go-uaa.svg)](https://travis-ci.org/cloudfoundry-community/go-uaa) [![godoc](https://godoc.org/github.com/cloudfoundry-community/go-uaa?status.svg)](http://godoc.org/github.com/cloudfoundry-community/go-uaa) [![Report card](https://goreportcard.com/badge/github.com/cloudfoundry-community/go-uaa)](https://goreportcard.com/report/github.com/cloudfoundry-community/go-uaa)\n\n### Overview\n\n`go-uaa` is a client library for the [UAA API](https://docs.cloudfoundry.org/api/uaa/). It is a [`go module`](https://github.com/golang/go/wiki/Modules).\n\n### Usage\n\n#### Step 1: Add `go-uaa` As A Dependency\n```\n$ go mod init # optional\n$ go get -u github.com/cloudfoundry-community/go-uaa\n$ cat go.mod\n```\n\n```\nmodule github.com/cloudfoundry-community/go-uaa/cmd/test\n\ngo 1.13\n\nrequire github.com/cloudfoundry-community/go-uaa latest\n```\n\n#### Step 2: Construct and Use `uaa.API`\n\nConstruct a `uaa.API` by using `uaa.New(target string, authOpt AuthenticationOption, opts ...Option)`:\n* The target is the URL of your UAA API (for example, https://uaa.run.pivotal.io); *do not* include `/oauth/token` suffix\n* You must choose one authentication method and supply it as the third argument. There are a number of authentication methods available:\n  * [`uaa.WithClientCredentials(clientID string, clientSecret string, tokenFormat TokenFormat)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithClientCredentials)\n  * [`uaa.WithPasswordCredentials(clientID string, clientSecret string, username string, password string, tokenFormat TokenFormat)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithPasswordCredentials)\n  * [`uaa.WithAuthorizationCode(clientID string, clientSecret string, authorizationCode string, tokenFormat TokenFormat, redirectURL *url.URL)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithAuthorizationCode)\n  * [`uaa.WithRefreshToken(clientID string, clientSecret string, refreshToken string, tokenFormat TokenFormat)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithRefreshToken)\n  * [`uaa.WithToken(token *oauth2.Token)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithToken) (this is the only authentication methods that **cannot** automatically refresh the token when it expires)\n* You can optionally supply one or more options:\n  * [`uaa.WithZoneID(zoneID string)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithZoneID) if you want to specify your own [zone ID](https://docs.cloudfoundry.org/uaa/uaa-concepts.html#iz)\n  * [`uaa.WithClient(client *http.Client)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithClient) if you want to specify your own `http.Client`\n  * [`uaa.WithSkipSSLValidation(skipSSLValidation bool)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithSkipSSLValidation) if you want to ignore SSL validation issues; this is not recommended, and you should instead ensure you trust the certificate authority that issues the certificates used by UAA\n\t* [`uaa.WithUserAgent(userAgent string)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithUserAgent) if you want to supply your own user agent for requests to the UAA API\n\t* [`uaa.WithVerbosity(verbose bool)`](https://godoc.org/github.com/cloudfoundry-community/go-uaa#WithVerbosity) if you want to enable verbose logging\n\n```bash\n$ cat main.go\n```\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\tuaa \"github.com/cloudfoundry-community/go-uaa\"\n)\n\nfunc main() {\n\t// construct the API\n\tapi, err := uaa.New(\n\t\t\"https://uaa.example.net\",\n\t\tuaa.WithClientCredentials(\"client-id\", \"client-secret\", uaa.JSONWebToken),\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// use the API to fetch a user\n\tuser, err := api.GetUserByUsername(\"test@example.net\", \"uaa\", \"\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"Hello, %s\\n\", user.Name.GivenName)\n}\n```\n\n### Experimental\n\n* For the foreseeable future, releases will be in the `v0.x.y` range\n* You should expect breaking changes until `v1.x.y` releases occur\n* Notifications of breaking changes will be made via release notes associated with each tag\n* You should [use `go modules`](https://blog.golang.org/using-go-modules) with this package\n\n### Contributing\n\nPull requests welcome.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry%2Fgo-uaa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudfoundry%2Fgo-uaa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry%2Fgo-uaa/lists"}