29 lines
1.2 KiB
Go
29 lines
1.2 KiB
Go
|
package usecase
|
||
|
|
||
|
import "context"
|
||
|
|
||
|
type VerifyMemberUseCase interface {
|
||
|
// GenerateRefreshCode 這個帳號驗證碼(十分鐘),通用的
|
||
|
GenerateRefreshCode(ctx context.Context, req GenerateRefreshCodeRequest) (GenerateRefreshCodeResponse, error)
|
||
|
// VerifyRefreshCode 驗證驗證碼,驗證完會刪除
|
||
|
VerifyRefreshCode(ctx context.Context, req VerifyRefreshCodeRequest) error
|
||
|
// CheckRefreshCode 驗證驗證碼,驗證完不會刪除
|
||
|
CheckRefreshCode(ctx context.Context, req VerifyRefreshCodeRequest) error
|
||
|
// VerifyPlatformAuthResult 驗證平台授權結果 -> 看密碼對不對
|
||
|
VerifyPlatformAuthResult(ctx context.Context, req VerifyAuthResultRequest) (VerifyAuthResultResponse, error)
|
||
|
GoogleVerify
|
||
|
LineVerify
|
||
|
}
|
||
|
|
||
|
type GoogleVerify interface {
|
||
|
// VerifyGoogleAuthResult 驗證 Google 授權結果
|
||
|
VerifyGoogleAuthResult(ctx context.Context, req VerifyAuthResultRequest) (GoogleTokenInfo, error)
|
||
|
}
|
||
|
|
||
|
type LineVerify interface {
|
||
|
// LineCodeToAccessToken 換取 AccessToken
|
||
|
LineCodeToAccessToken(ctx context.Context, code string) (LineAccessTokenResponse, error)
|
||
|
// LineGetProfileByAccessToken 用 Access Token 換取使用者的基本資料
|
||
|
LineGetProfileByAccessToken(ctx context.Context, accessToken string) (*LineUserProfile, error)
|
||
|
}
|