forked from Mirrors/oauth2
hipchat: Add endpoint function for HipChat server
Change-Id: I4578f5683aa9ed728e503cb3b08ff0bf743a62a2 Reviewed-on: https://go-review.googlesource.com/21712 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
33fa30fe45
commit
b0e2337fe6
|
@ -14,3 +14,12 @@ var Endpoint = oauth2.Endpoint{
|
|||
AuthURL: "https://www.hipchat.com/users/authorize",
|
||||
TokenURL: "https://api.hipchat.com/v2/oauth/token",
|
||||
}
|
||||
|
||||
// ServerEndpoint returns a new oauth2.Endpoint for a HipChat Server instance
|
||||
// running on the given domain or host.
|
||||
func ServerEndpoint(host string) oauth2.Endpoint {
|
||||
return oauth2.Endpoint{
|
||||
AuthURL: "https://" + host + "/users/authorize",
|
||||
TokenURL: "https://" + host + "/v2/oauth/token",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue