aliyun

package
v0.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aliyun

type Aliyun struct {
	// contains filtered or unexported fields
}

Aliyun ..

func New

func New(key, secret, roleArn, roleSessionName, loginURL, regionID string) *Aliyun

New ..

func (*Aliyun) Auth

func (t *Aliyun) Auth() (response *sts.AssumeRoleResponse, err error)

Auth 申请临时用户授权,获取临时的AccessKeyId,AccessKeySecret以及安全的Token

func (*Aliyun) Token

func (t *Aliyun) Token(accessKeyId, accessKeySecret, safeToken string) (signInToken string, err error)

Token 通过临时用户信息获取有效期为三小时的用户登录Token http://signin.aliyun.com/federation?Action=GetSigninToken

&AccessKeyId=<STS 返回的临时 AccessKeyId>
&AccessKeySecret=<STS 返回的临时 AccessKeySecret>
&SecurityToken=<STS 返回的安全 Token>
&TicketType=mini

func (*Aliyun) Url

func (t *Aliyun) Url(destination string) (url string, err error)

Url 获取链路跳转链接 http://signin.aliyun.com/federation?Action=Login

&LoginUrl=<登录失效跳转的地址,一般配置为自建 Web 配置 302 跳转的 URL>
&Destination=<链路追踪控制台页面链接>
&SigninToken=<获取到的登录 Token>

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL