1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-12-21 05:11:17 +00:00
nginx-sso/vendor/github.com/jda/go-crowd/base.go
Knut Ahlers 9b3c895c04
Update dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-04-22 06:44:07 +02:00

43 lines
780 B
Go

// Package crowd provides methods for interacting with the
// Atlassian Crowd authentication, directory integration, and
// Single Sign-On system.
package crowd
import (
"net/http"
"net/http/cookiejar"
)
// Crowd represents your Crowd (client) Application settings
type Crowd struct {
user string
passwd string
url string
cookies http.CookieJar
Client *http.Client
}
// New initializes & returns a Crowd object.
func New(appuser string, apppass string, baseurl string) (Crowd, error) {
cr := Crowd{
Client: http.DefaultClient,
user: appuser,
passwd: apppass,
url: baseurl,
}
// TODO make sure URL ends with '/'
cj, err := cookiejar.New(nil)
if err != nil {
return cr, err
}
cr.cookies = cj
return cr, nil
}
func (c *Crowd) get() {
}