Merge pull request #3 from Tazer/master

Returning the internal server so it can be used outside
This commit is contained in:
Lyric 2018-07-25 09:34:25 +08:00 committed by GitHub
commit 937be23639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,11 +13,12 @@ var (
)
// InitServer Initialize the service
func InitServer(manager oauth2.Manager) {
func InitServer(manager oauth2.Manager) *server.Server {
if err := manager.CheckInterface(); err != nil {
panic(err)
}
gServer = server.NewDefaultServer(manager)
return gServer
}
// HandleAuthorizeRequest the authorization request handling