mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
Remove unused scope methods
This commit is contained in:
committed by
Michal Horejsek
parent
f73aeec97f
commit
2e439e17cf
@ -74,27 +74,25 @@ func (api *FakePMAPI) Auth(username, password string, authInfo *pmapi.AuthInfo)
|
||||
return auth, nil
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) Auth2FA(twoFactorCode string, auth *pmapi.Auth) (*pmapi.Auth2FA, error) {
|
||||
func (api *FakePMAPI) Auth2FA(twoFactorCode string, auth *pmapi.Auth) error {
|
||||
if err := api.checkInternetAndRecordCall(POST, "/auth/2fa", &pmapi.Auth2FAReq{
|
||||
TwoFactorCode: twoFactorCode,
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
|
||||
if api.uid == "" {
|
||||
return nil, pmapi.ErrInvalidToken
|
||||
return pmapi.ErrInvalidToken
|
||||
}
|
||||
|
||||
session, ok := api.controller.sessionsByUID[api.uid]
|
||||
if !ok {
|
||||
return nil, pmapi.ErrInvalidToken
|
||||
return pmapi.ErrInvalidToken
|
||||
}
|
||||
|
||||
session.hasFullScope = true
|
||||
|
||||
return &pmapi.Auth2FA{
|
||||
Scope: "full",
|
||||
}, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (api *FakePMAPI) AuthRefresh(token string) (*pmapi.Auth, error) {
|
||||
|
||||
Reference in New Issue
Block a user