mirror of https://github.com/matrix-org/go-neb.git
Browse Source
Remove concept of AuthModule and ThirdPartyAuth
Remove concept of AuthModule and ThirdPartyAuth
Replaced by AuthRealm and AuthSession.pull/7/head
Kegan Dougal
9 years ago
6 changed files with 0 additions and 152 deletions
-
13src/github.com/matrix-org/go-neb/auth/auth.go
-
22src/github.com/matrix-org/go-neb/auth/github/github.go
-
32src/github.com/matrix-org/go-neb/database/db.go
-
46src/github.com/matrix-org/go-neb/database/schema.go
-
3src/github.com/matrix-org/go-neb/goneb.go
-
36src/github.com/matrix-org/go-neb/types/types.go
@ -1,13 +0,0 @@ |
|||
package auth |
|||
|
|||
import ( |
|||
"github.com/matrix-org/go-neb/auth/github" |
|||
"github.com/matrix-org/go-neb/database" |
|||
"github.com/matrix-org/go-neb/types" |
|||
) |
|||
|
|||
// RegisterModules registers all known modules so they can be retrieved via
|
|||
// type.GetAuthModule
|
|||
func RegisterModules(db *database.ServiceDB) { |
|||
types.RegisterAuthModule(&github.AuthModule{Database: db}) |
|||
} |
@ -1,22 +0,0 @@ |
|||
package github |
|||
|
|||
import ( |
|||
"github.com/matrix-org/go-neb/database" |
|||
"github.com/matrix-org/go-neb/types" |
|||
) |
|||
|
|||
// AuthModule for github
|
|||
type AuthModule struct { |
|||
Database *database.ServiceDB |
|||
} |
|||
|
|||
// Type of the auth module
|
|||
func (*AuthModule) Type() string { |
|||
return "github" |
|||
} |
|||
|
|||
// Process a third-party auth request
|
|||
func (am *AuthModule) Process(tpa types.ThirdPartyAuth) (err error) { |
|||
_, err = am.Database.StoreThirdPartyAuth(tpa) |
|||
return |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue