Exemple #1
0
func (self CasClientConfig) getServiceTicket(tgt, service string) (string, error) {
	params := map[string]string{"service": service}
	body, err := util.GetResponseBody(tgt, params)

	if err != nil {
		return "", err
	}

	return body, nil
}
Exemple #2
0
func (self CasServiceConfig) ValidateServiceTicket(ticket string) (*CasServiceResponse, error) {
	url := self.checkServiceTicketUrl()
	params := map[string]string{"ticket": ticket, "service": self.Service}
	body, err := util.GetResponseBody(url, params)

	if err != nil {
		return nil, err
	}

	return parseServiceResponse(body), nil
}