bingauth

package module
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

README

Microsoft Authority Golang Lib

好用的 Microsoft 登录库

支持密码、邮件验证码、Authenticator 验证

Golang

GitHub last commit GitHub

使用方法

待添加~

❗️ 免责声明

[!NOTE] 本项目所有功能仅供学习和娱乐交流使用, 不代表微软的官方观点或立场。本项目不对任何由使用本项目产生的直接或间接损失负责, 包括但不限于数据丢失、系统损坏、法律风险等。本项目不保证本站点的功能完整性、稳定性、安全性和准确性, 也不保证本项目与微软 New Bing 的一致性。本项目不对本站点的内容进行审核或监督, 用户应自行承担使用本站点的风险和责任。本项目保留随时修改或终止本站点的权利, 恕不另行通知。

在中国大陆范围内使用请遵循《生成式人工智能服务管理暂行办法》的要求, 请勿对中国地区公众提供一切未经备案的生成式人工智能服务。本项目开发者不对使用本项目产生的任何后果负责。

[!NOTE] This project is a demonstration site based on Microsoft New Bing, All function just for learning and entertainment purposes only, and does not represent the official views or positions of Microsoft. This project is not responsible for any direct or indirect losses caused by using this site, including but not limited to data loss, system damage, legal risks, etc. This project does not guarantee the functionality, stability, security and accuracy of this site, nor does it guarantee the consistency of this site with Microsoft New Bing. This project does not review or supervise the content of this site, and users should bear the risks and responsibilities of using this site. This project reserves the right to modify or terminate this site at any time without prior notice.

Please follow the requirements of the 《Interim Measures for the Management of Generative AI Services》 when using it in Chinese Mainland, and do not provide any unregistered generative AI services to the public in China. The developer of this project is not responsible for any consequences arising from the use of this project.

开源协议

本项目基于 AGPL-3.0 协议开源, 如需闭源使用请联系作者。

附加协议
  1. 作者不承担以任何方式使用本项目带来的一切责任;
  2. 不可移除本项目的版权声明与作者/来源署名;
  3. 当重分发经修改后的本软件时,需要在软件名或版本号中采用可识别的方式进行注明;
  4. 除非得到许可,不得以宣传为目的使用作者姓名;
  5. 本项目商业使用需联系作者获得授权。

Documentation

Index

Constants

View Source
const (
	TYPE_PASSWD = "passwd"
	TYPE_EMAIL  = "email"
	TYPE_DEVICE = "device"
)
View Source
const (
	USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthStruct

type AuthStruct struct {
	Account   string
	Password  string
	LoginType string

	Id        string
	Lcid      string
	Uaid      string
	FlowToken string
	Ppft      string
	Cobrandid string

	UrlGetCredentialType string
	CredentialType       getCredentialTypeResp

	UrlPostMsa string // Passwd Login Part 1
	UrlPost    string // Passwd Login Part 1

	UrlSessionState string // Device Login Part 1

	// Get Cookie
	ActionUrl    string
	PassportData struct {
		NAPExp  string
		PPRID   string
		NAP     string
		ANON    string
		ANONExp string
		T       string
	}
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(account, password, loginType string) *AuthStruct

func (*AuthStruct) Auth

func (a *AuthStruct) Auth() (cookies string, err error)

func (*AuthStruct) AuthDevice

func (a *AuthStruct) AuthDevice() (cookies string, err error)

func (*AuthStruct) AuthEmail

func (a *AuthStruct) AuthEmail(code string) (cookies string, err error)

func (*AuthStruct) GetLoginType

func (a *AuthStruct) GetLoginType() string

func (*AuthStruct) SetContext added in v1.1.0

func (a *AuthStruct) SetContext(ctx []byte) (err error)

func (*AuthStruct) SetCookie added in v1.1.0

func (a *AuthStruct) SetCookie(cookies string) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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