feat: improve login flow

This commit is contained in:
James Houlahan
2020-04-02 16:41:49 +02:00
parent 941e09079c
commit 6e38a65bd8
41 changed files with 595 additions and 362 deletions

View File

@ -43,7 +43,12 @@ type PanicHandler interface {
HandlePanic()
}
type Clientman interface {
type ClientManager interface {
GetClient(userID string) *pmapi.Client
GetAnonymousClient() *pmapi.Client
GetBridgeAuthChannel() chan pmapi.ClientAuth
AllowProxy()
DisallowProxy()
}
type PMAPIProvider interface {
@ -100,6 +105,7 @@ type CredentialsStorer interface {
Get(userID string) (*credentials.Credentials, error)
SwitchAddressMode(userID string) error
UpdateEmails(userID string, emails []string) error
UpdatePassword(userID, password string) error
UpdateToken(userID, apiToken string) error
Logout(userID string) error
Delete(userID string) error