目录
dependabot[bot]

Bump arnested/go-version-action from 2.1.1 to 2.1.2

Bumps arnested/go-version-action from 2.1.1 to 2.1.2.


updated-dependencies:

  • dependency-name: arnested/go-version-action dependency-version: 2.1.2 dependency-type: direct:production update-type: version-update:semver-patch …

Signed-off-by: dependabot[bot] support@github.com

1个月前191次提交

go-uaa Travis-CI godoc Report card

Overview

go-uaa is a client library for the UAA API. It is a go module.

Usage

Step 1: Add go-uaa As A Dependency

$ go mod init # optional
$ go get -u github.com/cloudfoundry-community/go-uaa
$ cat go.mod
module github.com/cloudfoundry-community/go-uaa/cmd/test

go 1.13

require github.com/cloudfoundry-community/go-uaa latest

Step 2: Construct and Use uaa.API

Construct a uaa.API by using uaa.New(target string, authOpt AuthenticationOption, opts ...Option):

$ cat main.go
package main

import (
    "log"

    uaa "github.com/cloudfoundry-community/go-uaa"
)

func main() {
    // construct the API
    api, err := uaa.New(
        "https://uaa.example.net",
        uaa.WithClientCredentials("client-id", "client-secret", uaa.JSONWebToken),
    )
    if err != nil {
        log.Fatal(err)
    }

    // use the API to fetch a user
    user, err := api.GetUserByUsername("test@example.net", "uaa", "")
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Hello, %s\n", user.Name.GivenName)
}

Experimental

  • For the foreseeable future, releases will be in the v0.x.y range
  • You should expect breaking changes until v1.x.y releases occur
  • Notifications of breaking changes will be made via release notes associated with each tag
  • You should use go modules with this package

Contributing

Pull requests welcome.

关于
624.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号