mirror of https://github.com/matrix-org/go-neb.git
Browse Source
Merge pull request #6 from matrix-org/kegan/auth-realms
Merge pull request #6 from matrix-org/kegan/auth-realms
Add concept of AuthRealmspull/9/head
Kegsay
9 years ago
committed by
GitHub
6 changed files with 173 additions and 11 deletions
-
37src/github.com/matrix-org/go-neb/api.go
-
27src/github.com/matrix-org/go-neb/database/db.go
-
67src/github.com/matrix-org/go-neb/database/schema.go
-
3src/github.com/matrix-org/go-neb/goneb.go
-
26src/github.com/matrix-org/go-neb/realms/github/github.go
-
24src/github.com/matrix-org/go-neb/types/types.go
@ -0,0 +1,26 @@ |
|||
package realms |
|||
|
|||
import ( |
|||
"github.com/matrix-org/go-neb/types" |
|||
) |
|||
|
|||
type githubRealm struct { |
|||
id string |
|||
ClientSecret string |
|||
ClientID string |
|||
WebhookEndpoint string |
|||
} |
|||
|
|||
func (r *githubRealm) ID() string { |
|||
return r.id |
|||
} |
|||
|
|||
func (r *githubRealm) Type() string { |
|||
return "github" |
|||
} |
|||
|
|||
func init() { |
|||
types.RegisterAuthRealm(func(realmID string) types.AuthRealm { |
|||
return &githubRealm{id: realmID} |
|||
}) |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue