aliyun

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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