public class BVHostedAuthenticationProvider extends java.lang.Object implements AuthenticationProvider
Authentication that clients configured for Hosted Authentication should use. You can check which authentication configuration you have by following these steps.
Constructor and Description |
---|
BVHostedAuthenticationProvider(java.lang.String uas)
Use this constructor if you managed to retrieve the UAS for the user.
|
BVHostedAuthenticationProvider(java.lang.String userEmailAddress,
java.lang.String callbackUrl)
When to use
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCallbackUrl() |
java.lang.String |
getUas() |
java.lang.String |
getUserEmailAddress() |
public BVHostedAuthenticationProvider(java.lang.String userEmailAddress, java.lang.String callbackUrl)
Use this constructor if you have not managed to retrieve the User Authentication String
(UAS) for the user. This method will send the user an email to confirm the
ConversationsSubmissionRequest
that this was attached to. The email will contain
a link for them to tap to confirm, and it will be composed of,
callbackUrl
you provided herebv_authtoken
query parameter generated by Bazaarvoice. You will use this to fetch a UAS.http://www.example.com/your/authentication-service?bv_authtoken=a7a4278ff33887d352fcdef30edd143f487dc881
bv_authtoken
You have multiple options for retrieving this bv_authtoken
,
IntentFilter
in your AndroidManifest.xml
. This will not
work if the user taps/clicks on the link on a different device.bv_authtoken
.UAS
Once you have the bv_authtoken
from the previous step, you can send off a UserAuthenticationStringRequest
,
which will return a UserAuthenticationStringResponse
. You can then obtain the UAS
by calling,
UserAuthenticationStringResponse.getUas()
. You should store this for the logged in user to make all
future requests with the BVHostedAuthenticationProvider(String)
constructor.
All content will still be submitted and moderated, and will show up in the display requests.
The consequences for not retrieving the UAS, and using the other constructor, is that the user will continue to be sent an email to confirm for each submission.
The consequences for a user not confirming their submission is that their user profile will not be merged with the content they submitted. If at any point in the future, your app is able to send a UAS then all of those cumulative profiles will be merged.
userEmailAddress
- The users email address which Bazaarvoice will send an email to, asking them to verify the submission. This may need to be whitelisted by Bazaarvoice.callbackUrl
- The link that will be posted in the email, that a user taps to confirm their submission. This must be whitelisted by Bazaarvoice.public BVHostedAuthenticationProvider(java.lang.String uas)
uas
- The User Authentication String from the UserAuthenticationStringResponse