google / identity-toolkit-java-client

Google Identity Toolkit client library for Java
Apache License 2.0
37 stars 27 forks source link

Provide public access to RpcHelper #21

Open robert4os opened 9 years ago

robert4os commented 9 years ago

Hi,

I noticed that 'password-users' do not have a verified email. In the forum I saw a suggestion to implement it by getting a oobCode and validating the email ourselves. So I managed to do this, but I had to 'clone' RpcHelper class to make the following requests:

1) Getting the oobCode. RpcHelper.getOobCode is public but it is not exposed through the GitkitClient class.

String oobCode=rpcHelper.getOobCode(params).getString("oobCode"); <<

2) Set the email verification status to 'confirmed', however rpcHelper.invokeGoogle2LegOauthApi has private access

rpcHelper.invokeGoogle2LegOauthApi("setAccountInfo", params)); <<

Thus my suggestion:

Since there are a number of git-API calls not supported currently it would be extremely useful to get 1) Access to the rpcHelper via gitkitClient.getRpcHelper(); 2) Public access to rpcHelper.invokeGoogle2LegOauthApi() 3) Public access to rpcHelper.invokeGitkitApi()

Thank you and best regards - Robert

dereksalama commented 9 years ago

I think the right thing to do here is to properly support the verify email functionality as we do for go.

robert4os commented 9 years ago

I agree, it certainly is the proper way in the long run but meanwhile making RpcHelper more accessible would be extremely helpful. So developers could implement getPublicKeys, resetPassword, setAccountInfo and verifyPassword if they need it. Btw, the toolkit is very useful, many thanks!

robert4os commented 8 years ago

Would be obsolete with pull request https://github.com/google/identity-toolkit-java-client/pull/37