dev - Added Request with extra params in order to support filters
Signed-off-by: nfel <nfilsaraee@gmail.com>
This commit is contained in:
parent
c24f5b928f
commit
3a44056962
@ -14,22 +14,23 @@ service AuthorizationService {
|
|||||||
|
|
||||||
rpc UserLoginSendOTP(UserSendOtpReq) returns (UserSendOtpRes) {}
|
rpc UserLoginSendOTP(UserSendOtpReq) returns (UserSendOtpRes) {}
|
||||||
rpc UserLoginWithOTP(UserLoginReq) returns (UserAccessTokenRes) {}
|
rpc UserLoginWithOTP(UserLoginReq) returns (UserAccessTokenRes) {}
|
||||||
rpc UserGetAccessTokenByRefreshToken(UserRefreshTokenReq) returns (UserAccessTokenRes) {}
|
rpc UserGetAccessTokenByRefreshToken(UserRefreshTokenReq)
|
||||||
|
returns (UserAccessTokenRes) {}
|
||||||
|
|
||||||
rpc UserGetUserPermission(InternalIAM) returns (PermissionList) {}
|
rpc UserGetUserPermission(InternalIAM) returns (PermissionList) {}
|
||||||
|
|
||||||
rpc UserGetIdentity(InternalIAM) returns (Identity) {}
|
rpc UserGetIdentity(InternalIAM) returns (Identity) {}
|
||||||
rpc UserUpdateIdentity(UserUpdateIdentityReq) returns (base.StatusRes) {}
|
rpc UserUpdateIdentity(UserUpdateIdentityReq) returns (base.StatusRes) {}
|
||||||
|
|
||||||
rpc UserGetBankInfoList(InternalIAM) returns (BankInfoList) {}
|
rpc UserGetBankInfoList(ReqWithIAMAndParams) returns (BankInfoList) {}
|
||||||
rpc UserUpdateBankInfo(UserUpdateBankInfoReq) returns (base.StatusRes) {}
|
rpc UserUpdateBankInfo(UserUpdateBankInfoReq) returns (base.StatusRes) {}
|
||||||
rpc UserRemoveBankInfo(IdReqWithIAM) returns (base.StatusRes) {}
|
rpc UserRemoveBankInfo(IdReqWithIAM) returns (base.StatusRes) {}
|
||||||
|
|
||||||
rpc GetUser(GetUserReq) returns (User) {}
|
rpc GetUser(GetUserReq) returns (User) {}
|
||||||
|
|
||||||
// Two Factor Authentication
|
// Two Factor Authentication
|
||||||
// For now it's only SMS-OTP - later will be Email-OTP or other methods can be added
|
// For now it's only SMS-OTP - later will be Email-OTP or other methods can be
|
||||||
// For HMAC-OTP there won't be a need to call this api
|
// added For HMAC-OTP there won't be a need to call this api
|
||||||
rpc SendTFAReq(TFAReq) returns (base.StatusRes) {}
|
rpc SendTFAReq(TFAReq) returns (base.StatusRes) {}
|
||||||
// For HMAC-OTP an initialization step must be added to exchange keys
|
// For HMAC-OTP an initialization step must be added to exchange keys
|
||||||
rpc InitTFAReq(InternalIAM) returns (TFAExRes) {}
|
rpc InitTFAReq(InternalIAM) returns (TFAExRes) {}
|
||||||
|
|||||||
@ -6,9 +6,7 @@ package authorization;
|
|||||||
Internal
|
Internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message InternalInitRoutesReq {
|
message InternalInitRoutesReq { repeated InternalRoute routes = 1; }
|
||||||
repeated InternalRoute routes = 1;
|
|
||||||
}
|
|
||||||
message InternalRoute {
|
message InternalRoute {
|
||||||
string path = 1;
|
string path = 1;
|
||||||
string method = 2;
|
string method = 2;
|
||||||
@ -30,20 +28,14 @@ message Permission {
|
|||||||
string method = 5;
|
string method = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PermissionList {
|
message PermissionList { repeated Permission list = 1; }
|
||||||
repeated Permission list = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UserSendOtp
|
UserSendOtp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message UserSendOtpReq {
|
message UserSendOtpReq { string mobile = 1; }
|
||||||
string mobile = 1;
|
message UserSendOtpRes { int64 expired_at = 1; }
|
||||||
}
|
|
||||||
message UserSendOtpRes {
|
|
||||||
int64 expired_at = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UserLogin
|
UserLogin
|
||||||
@ -53,9 +45,7 @@ message UserLoginReq {
|
|||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
string otp_code = 2;
|
string otp_code = 2;
|
||||||
}
|
}
|
||||||
message UserRefreshTokenReq {
|
message UserRefreshTokenReq { string refresh_token = 1; }
|
||||||
string refresh_token = 1;
|
|
||||||
}
|
|
||||||
message UserAccessTokenRes {
|
message UserAccessTokenRes {
|
||||||
string access_token = 1;
|
string access_token = 1;
|
||||||
int64 access_expired_at = 2;
|
int64 access_expired_at = 2;
|
||||||
@ -81,7 +71,10 @@ message IdReqWithIAM {
|
|||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
InternalIAM iam = 2;
|
InternalIAM iam = 2;
|
||||||
}
|
}
|
||||||
|
message ReqWithIAMAndParams {
|
||||||
|
InternalIAM iam = 1;
|
||||||
|
map<string, string> params = 2;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
User
|
User
|
||||||
@ -159,9 +152,7 @@ message UserUpdateBankInfoReq {
|
|||||||
string card_number = 4;
|
string card_number = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BankInfoList {
|
message BankInfoList { repeated BankInfo list = 1; }
|
||||||
repeated BankInfo list = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Status 0: Fail Verify, 1: Verified, 2: Does not Match user's credential
|
// Status 0: Fail Verify, 1: Verified, 2: Does not Match user's credential
|
||||||
enum BankInfoStatusEnum {
|
enum BankInfoStatusEnum {
|
||||||
@ -189,7 +180,8 @@ message TFAReq {
|
|||||||
InternalIAM iam = 1;
|
InternalIAM iam = 1;
|
||||||
optional string mobile = 2;
|
optional string mobile = 2;
|
||||||
optional string email = 3;
|
optional string email = 3;
|
||||||
optional string reason = 4; // issued jwt reason -> can be login, redeem, withdrawal
|
optional string reason =
|
||||||
|
4; // issued jwt reason -> can be login, redeem, withdrawal
|
||||||
}
|
}
|
||||||
|
|
||||||
// Two Factor Authentication Exchange Response
|
// Two Factor Authentication Exchange Response
|
||||||
|
|||||||
@ -7,7 +7,6 @@ message Empty {}
|
|||||||
message StatusRes {
|
message StatusRes {
|
||||||
bool success = 1;
|
bool success = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message IdRes {
|
message IdRes {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user