v2

package
v0.0.0-...-f123b97 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCASFailureResponse

func NewCASFailureResponse(c string, msg string) []byte

NewCASFailureResponse 创建一个 CAS XML 失败返回,包含错误码以及错误信息。

func NewCASProxyFailureResponse

func NewCASProxyFailureResponse(c string, msg string) []byte

NewCASProxyFailureResponse 创建一个 CAS Proxy XML 失败返回,包含错误码以及错误信息。

func NewCASProxySuccessResponse

func NewCASProxySuccessResponse(pt string) []byte

NewCASProxySuccessResponse 创建一个 CAS Proxy XML 成功返回,包含 Ticket。

func NewCASSuccessResponse

func NewCASSuccessResponse(u *db.User) []byte

NewCASSuccessResponse 创建一个 CAS XML 成功返回,包含用户信息。

func ValidateHandler

func ValidateHandler(c *context.Context)

Types

type CASAttributes

type CASAttributes struct {
	XMLName xml.Name `xml:"cas:attributes"`
	Email   string
}

type CASAuthenticationFailure

type CASAuthenticationFailure struct {
	XMLName xml.Name `xml:"cas:authenticationFailure"`
	Code    string   `xml:"code,attr"`
	Message string   `xml:",chardata"`
}

type CASAuthenticationSuccess

type CASAuthenticationSuccess struct {
	XMLName    xml.Name `xml:"cas:authenticationSuccess"`
	User       CASUser
	Attributes CASAttributes
}

type CASPgtIou

type CASPgtIou struct {
	XMLName xml.Name `xml:"cas:proxyGrantingTicket"`
	Ticket  string   `xml:",chardata"`
}

type CASProxyFailure

type CASProxyFailure struct {
	XMLName xml.Name `xml:"cas:proxyFailure"`
	Code    string   `xml:"string"`
	Message string   `xml:",chardata"`
}

type CASProxySuccess

type CASProxySuccess struct {
	XMLName xml.Name `xml:"cas:proxyTicket"`
	Ticket  string   `xml:",chardata"`
}

type CASServiceResponse

type CASServiceResponse struct {
	XMLName      xml.Name `xml:"cas:serviceResponse"`
	Xmlns        string   `xml:"xmlns:cas,attr"`
	Success      *CASAuthenticationSuccess
	Failure      *CASAuthenticationFailure
	ProxySuccess *CASProxySuccess
	ProxyFailure *CASProxyFailure
}

type CASUser

type CASUser struct {
	XMLName xml.Name `xml:"cas:user"`
	User    string   `xml:",chardata"`
}

Jump to

Keyboard shortcuts

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