auth

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package auth 鉴权管理接口

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPublicKey

func AddPublicKey(clt *core.SDKClient, accessToken string, req *auth.AddPublicKeyRequest) (*auth.PublicKey, error)

AddPublicKey 新增公钥 广告主将公钥保存到平台。 为支持切换密钥的场景,广告主最多可使用两对公/私钥对,两对的label约定为“primary”、“backup”。 为确保广告主使用了正确的公钥格式和签名算法,在新增公钥时有一步验签的动作,广告主使用私钥对指定文本“BYTEDANCE”签名。

func DelPublicKey

func DelPublicKey(clt *core.SDKClient, accessToken string, req *auth.DelPublicKeyRequest) error

DelPublicKey 删除公钥 广告主删除公钥。 鉴权关闭状态下,可直接删除;鉴权开启状态下,平台会检查最近一段时间(24小时)是否有待删除密钥的使用记录,如果没有则可删除,否则删除失败。

func Disable

func Disable(clt *core.SDKClient, accessToken string, advertiserID uint64) error

Disable 关闭鉴权 广告主关闭鉴权。关闭鉴权后,回传的转化数据即使鉴权失败也不会被丢弃。平台会缓存广告主的鉴权开启状态,缓存时长约3分钟,这意味着,最长会有3分钟的过渡时间。

func Enable

func Enable(clt *core.SDKClient, accessToken string, advertiserID uint64) error

Enable 开启鉴权 广告主开启鉴权。 鉴权关闭状态下,鉴权失败的转化数据不会被丢弃,同时返回鉴权失败原因,方便广告主调试定位。开启鉴权后,鉴权失败的转化数据将被丢弃。平台会缓存广告主的鉴权开启状态,缓存时长约3分钟,这意味着,最长会有3分钟的过渡时间。 广告主确认上线后有成功回传转化,且没有鉴权失败(观察24h以上,最长不超过一周)之后,可请求“开启鉴权”接口,平台检查是否满足开启条件,如果满足则开启,否则开启失败。

func GetAllPublicKeys

func GetAllPublicKeys(clt *core.SDKClient, accessToken string, req *auth.GetAllPublicKeyRequest) ([]auth.PublicKey, error)

GetAllPublicKey 查询全部公钥 广告主查询公钥。

func GetAuthStatus

func GetAuthStatus(clt *core.SDKClient, accessToken string, advertiserID uint64) (bool, error)

GetAuthStatus 查询鉴权开启状态 广告主查询鉴权开启状态。

func GetPublicKey

func GetPublicKey(clt *core.SDKClient, accessToken string, req *auth.GetPublicKeyRequest) (*auth.PublicKey, error)

GetPublicKey 查询公钥 广告主查询公钥。

Types

This section is empty.

Jump to

Keyboard shortcuts

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