Hello Graham,
You need to create a user, maybe use *operator* and make sure the user has
permission to access customer (READ). Then you have to create a class which
uses this user to connect and authenticate each time with the identity
service before each customer information is retrieved.
This user could be defined in the yml file of your service and then
injected into the Authentication Class you create.
Each event which is emitted most often has the tenant within the message.
just get this tenant and check and set the *TenantContextHolder *if not
already set just before you authenticate. Immediately after authentication,
Set the *UserContextHolder* too
Another point is to remember to trim or remove the quotes from the customer
identifier before trying to get more contact details about that customer:
{String}.replaceAll("^\"|\"$", "")
I hope this helps
Thanks.
Awasum Yannick
On Tue, Jul 3, 2018 at 11:18 PM Ebenezer Graham <[email protected]>
wrote:
> Hello there,
>
> I would like to retrieve a customer after it has been created, or activated
> etc.
>
> I have coded the logic to send the SMS and email after getting the contact
> details, however, I have to get the customer to get the contact details.
>
> This is the error I get during my call: https://pastebin.com/zrebwE8v
>
> I would like to get clarifications on how to set the tenant and correctly
> make authentication during a rest call.
>
> I would also like to get a better understanding of how to use the Anubis,
> test and identity microservice in this case
>
> *At your service,*
>
> *Ebenezer Graham*
>
> *BSc (Hons) Computing*
>
>
> [image: EmailSignature.png]
>
> African Leadership University,
>
> Power Mill Road, Pamplemousses,
>
> Mauritius.
>
>
> *skype*:
> ebenezer.graham
> GitHub <https://github.com/ebenezergraham> | LinkedIn
> <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> <https://twitter.com/pactmart> | Facebook
> <https://www.facebook.com/pactmart>
> www.pactmart.com | Freelancing made easy.
>
>
> *“Talk is cheap, show me the code.” *- *Linus Torvalds*
>
>
>
> On 19 May 2018 at 00:41, Ebenezer Graham <[email protected]> wrote:
>
> > Hi everyone,
> >
> > I am Ebenezer a student from the African Leadership University and I will
> > be working on this project under the mentorship of Isaac Kamga.
> >
> > The idea is to use this thread to discuss the decisions being made on
> this
> > project so that the community has visibility on what's happening and most
> > importantly give constructive feedback.
> >
> > *EventListeners:*
> > This is the Doc
> > <
> https://docs.google.com/document/d/1kme5qrxOrO0WGUEvNgzv5XVkgWtpg0lbX-CrBH4js7o/edit?usp=sharing
> >
> > containing the shortlisted events which I believe qualify for an Email or
> > SMS notification. Please review and comment on the doc suggesting any
> > addition or deletion or related feedback.
> >
> > *UI for the service:*
> > This is a link <https://wireframe.cc/pro/pp/5fb6b2e61167290> to the
> > wireframes for the UI of the service. Please give pointers on what could
> be
> > added and what should be taken out.
> >
> >
> > *At your service*
> > *,*
> >
> > *Ebenezer Graham*
> >
> > *BSc (Hons) Computing*
> >
> >
> > [image: EmailSignature.png]
> >
> > Beau Plan Business Park | West Building
> >
> > Pamplemousses | Mauritius
> >
> >
> > <http://www.pactmart.com/>
> > <http://www.pactmart.com/>
> > www.pactmart.com | Freelancing made easy.
> > GitHub <https://github.com/ebenezergraham> | LinkedIn
> > <https://www.linkedin.com/in/ebenezer-graham/> | Twitter
> > <https://twitter.com/pactmart> | Facebook
> > <https://www.facebook.com/pactmart> | Website
> > <http://ebenezergraham.github.io/>
> >
> > *skype*:
> > ebenezer.graham
> > | *Phone*:
> > +230 5840 9206
> >
> >
> > *“Practice isn’t the thing you do once you’re good. It’s the thing you do
> > that makes you good.”*
> > -*Malcolm Gladwell*
> >
> >
> >
>