Skip to content

lucasuyezu/golang-cas-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go CAS Client

How to request a Service Ticket

import (
  "fmt"
  "github.com/lucasuyezu/cas"
)

func main() {
  cas := cas.NewClient("https://server", "user", "pass")
  ticket, _ := cas.RequestServiceTicket("service")

  fmt.Println("ST is ", ticket)
}

How to validate a Service Ticket

import (
  "fmt"
  "github.com/lucasuyezu/cas"
)

func main() {
  cas := cas.NewService("https://server", "service-host")
  response, _ := cas.ValidateServiceTicket("service")

  fmt.Println("ST is ", response.Status)
}

TODO

  • Improve error handling
  • Invalidate a Service Ticket
  • Reuse a TGT (Ticket Granting Ticket) to generate more than one Service Ticket
  • Invalidate a TGT (sign out from all services)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published