wssecurity

package
v0.0.0-...-e86600b Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiCheck

type ApiCheck func(appKey string) (appSecret string, err error)

type XWSSE

type XWSSE struct {
	PasswordDigest string
	AppKey         string
	Nonce          string
	Created        string
}

func (*XWSSE) Check

func (x *XWSSE) Check(authorization, xwsse string, getAppSecret ApiCheck) (err error)

Check x-wsse 校验 Authorization=`WSSE profile="UsernameToken"` X-WSSE: UsernameToken Username="bob", PasswordDigest="quR/EWLAV4xLf9Zqyw4pDmfV9OY=", Nonce="d36e316282959a9ed4c89851497a717f", Created="2006-01-02T15:04:05Z" PasswordDigest=base64(sm3(Nonce + Created + AppSecret)) Nonce 随机数 Created 时间, 2006-01-02T15:04:05Z

func (*XWSSE) CheckSum

func (x *XWSSE) CheckSum(appSecret string) (err error)

CheckSum 校验PasswordDigest

func (*XWSSE) Marshal

func (x *XWSSE) Marshal(appSecret string) (xwsse string, err error)

Marshal 序列化

func (*XWSSE) Sum

func (x *XWSSE) Sum(appSecret string) (string, error)

Sum 生成PasswordDigest PasswordDigest=sm3(Nonce + Created + AppSecret)

func (*XWSSE) UnMarshal

func (x *XWSSE) UnMarshal(xwsse string) (err error)

UnMarshal 反序列化

Jump to

Keyboard shortcuts

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