Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,140,494 members, 7,770,213 topics. Date: Tuesday, 19 March 2024 at 07:39 AM

Sweetguy10's Posts

Nairaland Forum / Sweetguy10's Profile / Sweetguy10's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 58 pages)

Agriculture / Re: How Do I Stop This Continuous Bee Attack On The Farm? by sweetguy10(m): 11:36am On Jul 19, 2023
Fire , smoke ....Locate the queen bee throne and destroy their colony . Ensure you have level 4 Hazmat suits on , cos it's like fighting indoctrinated , subsidy-hungry/angry boko haram foot soldiers

2 Likes 1 Share

Programming / Re: Java Programming Language Is A Money Ritual Language by sweetguy10(m): 8:52pm On Jul 12, 2023
Yeah but you gotta be good at it . I developed a POS and ATM Terminal debit/credit card processing system that routes transaction to multiple card payment processors based on business logic , charges all kind of cards verve,visa and MasterCard both online pin verification and offline . I decided to delve in deeper and understand how apps are created on card chips with lead me to Java Card Architecture for writing card applets to chips /smart cards . You will be amazed at how powerful Java is , it's WORA capabilities is very good for business .Over 10 billion devices - SIM cards , Financial cards (credit and debit), Access door cards, Loyalty programme cards and yes the NFC architecture for contactless cards payment are all powered by Java. For the Java haters, you are just pained because you find it hard to understand the dynamics of OOP. JAVA will keep being king of enterprise applications and yes enterprise is the field you play in when you want the money in tech if you don't intend to be a founder RT al

As for me , plan is to get snapped up by a chip embossing company and eat the mulllaaaassss!!

Java reigns supreme .

3 Likes 2 Shares

Nairaland / General / Re: My Neighbour Is Loud All The Time by sweetguy10(m): 4:54pm On Jun 13, 2023
woginid967:



Forget about him ,why dont you let me take you out of that apartment, to a short let and we get loud slutting each other out, while you sit on my face till you squirt and i cum inside ice cream and you drink it to stay healthy. Just do crazy shit like threesomes and orgies together. Your neighbor obviously wants to fuvk u, so he's frustrating you will u go up there and silence him with you labia.
grin grin grin

1 Like 1 Share

Crime / Re: My Story As A Cult Member........initiation Phase Included... by sweetguy10(m): 2:28pm On Nov 27, 2022
Perkins1:
Sorry for making the write ups linger than necessary. Make una no vex na work cause am, I no dey get chance like that. Na from one job to another.
**********************************

If you move?

This was the words from my direction, as expected majority didn't move a few stood up, I was leaning on a wall and from my view I counted 5 heavily armed men in security uniform.

We tried to struggle but it was in futility because seem the whole base has been mapped but it's nothing of the ordinary afterall no be today men dey take beating from friends and foes. Amongst those present were Osayande, Michael, Osas, these are ND 1 students whom were just initiated into the cult as they were still fresh from Bush. We were matched to 2 waiting vans, some in handcuffs. I was not handcuffed as I voluntarily led the pack to the Van because for one thing, I had deadened my conscience and as such, I really don't cower in face of trouble. I just know every trouble has got a solution. That afternoon we were moved to Iyakpi police station for profiling. Together they arrested 8 of us including the person who was supposed to help us see what is happening before it gets to us.

Next day at almost midnight we were moved from the police station to Area Command in Benin City and when we got there a case was established on our heads as arm robbers caught with deadly weapons. This came as a shock because that was not what we wrote while we were held at Iyakpi police station in Auchi. But at this point you're powerless to even argue or contest anything. (When you're arrested as a cultist, 70% of the time, you're been profiled by a cultist or someone who knows too much about your particular cult group) hence the following.

Officer: Aye, how far, wetin carry you come here, why you go let those men cramp you like that? You were be worldwide. I surprise when I hear na why I come make we reason make I see how to vault you out of this mess blooda.

Me: Who send you officer, I no know wetin you dey talk, I be student of Auchi Polytechnic, xxxx department. I dey sleep when them come arrest me, I surprise say I dey hear now say I be arm robber. Officer I no be arm robber.

Officer: You no want make I help you abi, you think say na play we dey play for here, see ask of me from your head even former aye wey don Lord up sef, na me dey position them when matter sup. Talk to me.

Me: Officer na true I dey tell you, I no be arm robber, I be student of (a big slap landed my chin) like a flash my eyes started seeing things.

You think say I dey follow you laugh you bloody thief, you go die for prison, na una dey spoil NBM wey make am come turn wetin children like una dey use do yeye meeting. He continued to rant and pour insults.

Somehow one of the new aye had already fidgeted and narrated everything and everyone's position from office holders to an ordinary. After 3 days we came face to face with the person who set us up. A student in ND one that was initiated against his will and he took it too bad that he swore to get his pound of flesh only if he knew I will lost my Dad through all these. In his company were two strongfaced soldiers and some people which I later found out were his family. At that point my GF had already contacted my sister whom had told my mom and when I was brought out of the cell, I met my mom crying and being pushed around by the Police. The young man pointed at me as a member who participated in the gruesome toture in the name of initiation that led to the death of a young ND 1 boy.

2 days later my parents were still walking about on how to get me out. My Dad swore he would not show face that since I can commit such atrocities I should be man enough to bear the consequences that he would rather not have a son than have a cultist and a murderer. (these were what my sister told me, because I didn't get to talk with him during trials). We were charged to court for cult activities and murder not forgetting the charge of arm robbery labeled against us. Now in the cell I had already command some respect amongst inmate because of the number of aye in the cell. I was giving a special corner of the cell to sit and sleep.

First day of court appearance, our IPO wasn't around after dressing up to go to court we were sent back in till Friday again. There I met my mum again and she told me, if I die, na you kill me. I have given up everything for you but this is how you choose to pay me. That was the only time tears rolled down my eyes in years and the reality of what I had done and who I was now started making no-sense to me as my mom was crying my last sister was crying now inside the cell in my small corner, I can only remember the promises I made to them to always be there for them and ensure I stay alive so they won't suffer. I cried bitterly in my heart and that moment I renounced inside me everything and anything about Cultism or rascality (ruggedity). Before Friday, Osayande family had come for him and he was bailed, his father is a Chief (he sits and dine with the Oba) now my people were still going up and down for me I know it was gonna be difficult because of what I have done, my whole life had been played before my Dad and he frowns bitterly about it and gave up on having a son.

Court appearance on Friday, the trial judge adjourned our case till a fortnight again, another person was released on bail. I was growing slim and frustrated as this is not the type of life I planned for myself, here I am missing up with criminals and low lifers inside this cell while my course mates are going about their school activities freely. I can't even say one good thing I did for myself as a cultist. My family is a good Christian, my mother a praying woman so how did I end up like this. I don't know how to pray but I told God in silent, if I come out of this I will never go back to cultism ever, the day I do, TAKE MY LIFE!

A younger brother spent just three months in Ikoyi prison for an auto accident involving life issue. We know what we went through, he knows what HE went through, the trauma is still with us ... i feel your story deep in my veins . Sadly your dad was the penance....RIP to him ...may you find peace and it abide with you forever.

12 Likes

Career / Re: Tech Is The New "Oil" Money by sweetguy10(m): 7:55pm On Sep 22, 2022
DeOTR:

With your experience, 3 years in Java and .NET (is that not what you meant by Core?), you're good to go with Turing and/or Crossover.
Their screening processes can be difficult, but you can always reapply after failing an attempt.

Crossover screening is too tedious. No .NET is not core java. It is a framework
Career / Re: Tech Is The New "Oil" Money by sweetguy10(m): 4:04pm On Sep 22, 2022
batistutajulio:


If it is true, then everybody will get a job easily. I don't know where you work but I am talking about software programming specifically.

Of course I am talking about software development jobs . Just be quite good at what you know and know it well . Opportunities abound .
Career / Re: Tech Is The New "Oil" Money by sweetguy10(m): 3:29pm On Sep 22, 2022
batistutajulio:
I agree it is the new oil money but only for those who are highly competent.

It is not even easy to get a job 'cause getting the job is just like any other physical hustle.

I encourage everyone to enroll in tech and acquire a skills.

I love it when people give it a chance. All the best to everyone.

This is not true .......in 2018 right after my NYSC a job was already waiting for me . I quit from another place in July 2022 and a week after I got employed . In fact I had three Jobs waiting but went for the one I thought will be better .

1 Like

Career / Re: Tech Is The New "Oil" Money by sweetguy10(m): 3:27pm On Sep 22, 2022
I am very good with Jave , Core and Enterprise . I am very good and adept at software development .... I have 3 years of professional extensive software development , management and I have successfully lead two projects as the backend developer . How do I get online/remote gigs ? I need someone to please point them to me .

Thanks

1 Like

Programming / How Do I Go About This System Design ? by sweetguy10(m): 6:53pm On Aug 07, 2022
Good day everyone , I have this Java/Spring boot project where I need to return objects values in XML . The thing is most of the variables to be returned have their fixed final variables values already , how do I go about not persisting them in the database but can call them anytime that I need to add them up to a payload for a POST operation? This is a sample of how the response payloads should be like .

<person>
<contact>
<number>09087431264</number>
<age>30</age>
</contact>
</person>

As you can see the number and age fields in the contact class are fixed final variables inside the person object which is an entity. I used @Embeddable and @Embedded to add the Contact class to the Person entity but it added the column : Number and Age to the Person entity and making a REST call to the Person entity will not return the person entity with the XML schema as posted above . Inputs and help will be greatly appreciated .

@richebony your input as well will be greatly appreciated sir thanks much.
Travel / Re: Help With Canada Permanent Residency Application Guidelines ! by sweetguy10(m): 8:31pm On Jun 29, 2022
ednut1:
google the company name you will find reviews pointing out they are a scam/shady. They will only take your money. You cannot apply for Canada permanent residency unless you meet the requirements and have the required documents to open an account with them. All the information is here https://www.nairaland.com/6829885/canadian-express-entry-federal-skilled

You need ielts and eca( evaluation of credentials to be able to open an account with Canada immigration itself.
See an old posts of victims https://www.nairaland.com/1263143/canadian-visa-experts-scam#17330472
https://www.nairaland.com/1263143/canadian-visa-experts-scam/1#36479939

https://www.nairaland.com/1263143/canadian-visa-experts-scam/1#68632062

Sadly a lot of Nigerians dont want to research or want shortcuts. You deserve to be scammed in my Oponu

Man, calm it. You can make your points succintly without being insultive, what kind of mother raised you ? or is it the Nigerian-always-wanting-to-be-insultive factor ? I checked google reviews canadavisaexpert does not a bad reviews on there. Anyways ur point is noted, no thanks though.
Travel / Re: Help With Canada Permanent Residency Application Guidelines ! by sweetguy10(m): 11:33am On Jun 29, 2022
ednut1:
you are applying on a fake or non Canada immigration website.

The site is canadianvisaexpert.com is this really fake ? Can you please point me to the actual site ? thanks in anticipation
Travel / Help With Canada Permanent Residency Application Guidelines ! by sweetguy10(m): 10:20pm On Jun 28, 2022
I am currently registering for Canada permanent residency program . I am stuck somewhere around What is your family's annual income in US dollars? and What is your estimated net worth in US dollars? * The options Includes : Less than 300,000 between 300,00 - 1,599,999 and the third option is 1,600,000 . What option should I select so as to get better points ? Thanks
Education / Re: The Average Nigerian Does Not Know about Nairaland. by sweetguy10(m): 7:56pm On Apr 13, 2022
That's why users are quite anonymous. You don't know ...
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 1:59pm On Jan 20, 2022
richebony:


No, custom credentials for your apache tomcat server

still getting the same 404 / connection to server lost .

This is my application.properties file

and pom.xml. I added tomcat dependency to the dependency list

for the serverport I used 22 before but because of same issue I changed to 8080

Then for React in the AxiosConfig base url is http://ibank.bethsaidainvestmentpartners.com:8080.

When I test http://ibank.bethsaidainvestmentpartners.com:8080. on browser it navigates to ApacheTomcat Home Dashboard . What could I be doing wrong I'm really frustrated.

Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 12:15pm On Jan 20, 2022
richebony:


Firstly it should be a war file and you must tell your spring boot starter file that your want to package the application as a Web application Archive

public class ApplicationName extends SpringBootServletInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(ApplicationName.class);
}

public static void main(String[] args) {
SpringApplication.run(ApplicationName.class, args);
}



}


I think you should stage it in your local environment first before you deploy it on your remote machine, the steps are quite the same

extracting files on the /domain/web apps folder isn't the right approach from what I know, I think tomcat has an administrator(GUI) interface where you deploy your apps,

To create a new user you must change the configuration settings in the conf/tomcat-users.xml and supply your credentials


<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<user username="your-username" password="your-password" roles="manager-gui" />

<tomcat-users>


restart the server

You can easily log in with your credentials then deploy your app.

Repeat the same process on your remote server



I really appreciate you I've done everything but For the bolded , is it the server root username and pass or the domain cpanel username and pass ?
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 11:18am On Jan 20, 2022
richebony:
Are u using a cloud solution provider or a shared hosting platform . I think AWS offers a 1-year free tier you can use a Linux instance(EC2) for staging and provision it for your application, or rather go with GCP and put a cap on your expenditure.


The React(Frontend) is being deployed in public_html directory on same server after it has been built to production and it's running ( Login Page)

No its being deployed on a VPS server Centos 7 . I packaged as a WAR file , Installed Apache Tomcat to the WHM/Cpanel, then I Uploaded the renamed build to ROOT.war then I extracted there. (inside Catalina/domain/webapps). I get error 404 when trying to login.

Should I package the backend as a JAR because it does not have html, jsp or leave it as a WAR package then exclude the spring-boot-maven-plugin from <build></build> from pom.xnl file ?
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 10:07am On Jan 20, 2022
richebony:
No local one though ..just on reddit and fb ...do I know anyone I can join

Good morning sir , I need your input on deploying the backend app.
Romance / Re: Which Alcohol bleeped You Up And Made You Say “i’m Never Taking Alcohol Again?” by sweetguy10(m): 6:47am On Dec 21, 2021
Action bitter the bottle, almost finished one . Then I drove , blacked out on the wheels , car swerved and jumped the culvert to the other lane of the road while my leg was glued to accelerator making me do a 120 on a road that normal should've been a 60km.....Hmmm... thank God for life ...
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 10:18pm On Nov 23, 2021
richebony:
You can add a method level prefilter to allow only managers to access the method

When you return the currently logged in user get the branch Id of that manager

Query the db for all users where the branch id is equal to the returned branch id and the role is marketer

Since you have a onetomany bidirectional relationship between the marketers and their customer you can return a list of all customers for each marketer returned and append it to a main list that would be returned as a json object

So I refactored and passed the Branch object as the query parameter , then changed the logged in User authentication by Inserting spring security Principal object to get the authenticated user , got the user branchID and got the customers registered under the director's branch, thanks once again sir . Do you belong to any local java community ?
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 11:59am On Nov 23, 2021
richebony:
I think the issue should be in your JWTAuthorizationFilter Class (if you have any ).because on every request the Authentication object should be set by extracting the relevant details from the generated token
Something like this

.........................................................................................

Good day sir , please I need your help one more time with a custom query implementation. Still on the user role login, When the UserRole Managing Director logs In, I want the userrole Managing Director to only see customers assigned to UserRole Marketers with the same Branch ID as the Managing Director.

I have a custom Query in the customer repository that returns a null result. I have the user authentication issue resolved so I am pretty sure it's my query. Kindly help check if the query is correct. Thanks sir
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 1:13pm On Nov 18, 2021
richebony:
I think the issue should be in your JWTAuthorizationFilter Class (if you have any ).because on every request the Authentication object should be set by extracting the relevant details from the generated token
Something like this

jwt = jwt.replace(SecurityConstants.TOKEN_PREFIX, ""wink;
SecretKey key = Keys.hmacShaKeyFor(SecurityConstants.JWT_KEY.getBytes(StandardCharsets.UTF_8));
Claims claims = Jwts.parserBuilder().setSigningKey(key).build().parseClaimsJws(jwt).getBody();
String username = String.valueOf(claims.get("username"wink);
String authorities = (String) claims.get("authorities"wink;
Authentication auth = new UsernamePasswordAuthenticationToken(username, null,
AuthorityUtils.commaSeparatedStringToAuthorityList(authorities));
SecurityContextHolder.getContext().setAuthentication(auth);



...and I don't see any filters added to your HttpSecurity configure method in your WebSecurity class

There should be something like this

http.addFilterAfter(new AuthoritiesLoggingAfterFilter(), BasicAuthenticationFilter.class)
.addFilterBefore(new JWTTokenValidatorFilter(), BasicAuthenticationFilter.class)

One of the issues with JWT authentication is that there different implementations, a beauty, and a curse. I can give u the one that works for me. It's long and you have to do some major refactoring

And for the naming issue, i don't really get it but the difference between userName and username is that hibernate would map requests with
userName to the column named "user_name", while username will be mapped to "username"

And please change your antMachers to mvcMatchers..They are less opinionated

Got it resolved thanks much !!! the problem before was that the frontend guy did not add the token bearer to requests going to marketers/customers endpoint . I tested on postman with the generated token added to the authorization header just as you suggested then refactored the entity classes User and Branch by removing the toString methods therein because it was causing an Infinite recursion and VOILA ! I got customers attached to the authenticated User. I really appreciate your patience with me you are such a rare one , thanks once again .

1 Like

Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 4:56pm On Nov 17, 2021
richebony:
I think the issue should be in your JWTAuthorizationFilter Class (if you have any ).because on every request the Authentication object should be set by extracting the relevant details from the generated token
Something like this

jwt = jwt.replace(SecurityConstants.TOKEN_PREFIX, ""wink;
SecretKey key = Keys.hmacShaKeyFor(SecurityConstants.JWT_KEY.getBytes(StandardCharsets.UTF_8));
Claims claims = Jwts.parserBuilder().setSigningKey(key).build().parseClaimsJws(jwt).getBody();
String username = String.valueOf(claims.get("username"wink);
String authorities = (String) claims.get("authorities"wink;
Authentication auth = new UsernamePasswordAuthenticationToken(username, null,
AuthorityUtils.commaSeparatedStringToAuthorityList(authorities));
SecurityContextHolder.getContext().setAuthentication(auth);



...and I don't see any filters added to your HttpSecurity configure method in your WebSecurity class

There should be something like this

http.addFilterAfter(new AuthoritiesLoggingAfterFilter(), BasicAuthenticationFilter.class)
.addFilterBefore(new JWTTokenValidatorFilter(), BasicAuthenticationFilter.class)

One of the issues with JWT authentication is that there different implementations, a beauty, and a curse. I can give u the one that works for me. It's long and you have to do some major refactoring

And for the naming issue, i don't really get it but the difference between userName and username is that hibernate would map requests with
userName to the column named "user_name", while username will be mapped to "username"

And please change your antMachers to mvcMatchers..They are less opinionated

I have a JWT Filter here is the attached image and the filter has been added to my HttpSecurity config , couldnt snipe it earlier because of the length of the code . Here they are

Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 11:24am On Nov 17, 2021
richebony:
That's why I asked if you were able to log in and the tokens were sent to the headers, if so, please send your Authentication(Token generation) and Authorization filter implementations and also your UserRoles class. If your codes are similar to the attached, then the issue should be from there.
Your roles should also implement the GrantedAuthority interface that's the only way you can pass it directly to the returned User class in the UserDetailsServiceImpl.



I removed /** from antmatchers parameter and authorized all requests going to marketers/customers endpoint then signed in on postman , it generated a token and I put it in the header then made request call to marketers/customers , returned NullPointerException: null . I noticed that when I tried to use userName it returned a bad credentials response till I changed to username but what I have in my User entity is userName. What could I be doing wrong ? Please forgive my back and forth this is my first huge project with Spring Security.

Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 1:57pm On Nov 16, 2021
richebony:
That's why I asked if you were able to log in and the tokens were sent to the headers, if so, please send your Authentication(Token generation) and Authorization filter implementations and also your UserRoles class. If your codes are similar to the attached, then the issue should be from there.
Your roles should also implement the GrantedAuthority interface that's the only way you can pass it directly to the returned User class in the UserDetailsServiceImpl.



I use a MyUserDetails class that Implements UserDetails and build with the User class , could the problem be from there ? Here are what I have thanks much I appreciate you

Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 10:28am On Nov 16, 2021
richebony:
You said you used jwt for your authentication. .can you log in ?..please show me the response it gives when you log in

Because the authentication object cannot return null if that path is protected and you have been duly authenticated


For that service layer issue ..try querying using the repoObject ..and see the result

So I ran a test to get list of Customers assigned to User type Marketer but it still return null values even though the findByUserName in the user repo method is working. I Autowired the UserRepository to the UserService class and did the concrete implementation in the service class , then Imported and Autowired the UserService class to the customer controller to be able to use the findByUsername method and pass the authentication.getName method as a parameter. Where am I getting it wrong ?

The last image is to confirm that the findByUserName method in the user repository is functional
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 10:57pm On Nov 15, 2021
richebony:
You said you used jwt for your authentication. .can you log in ?..please show me the response it gives when you log in

Because the authentication object cannot return null if that path is protected and you have been duly authenticated


For that service layer issue ..try querying using the repoObject ..and see the result

I think that happened because of spring security UserDetails class that maps to User class and get the Username value directly, might be wrong though. I appreciate your support so far.
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 10:46pm On Nov 15, 2021
bet9ja:
 @PathVariable("username"wink or @PathVariable String username

Fixed it before seeing this , you are absolutely right. appreciate your contribution thanks much.
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 10:42pm On Nov 15, 2021
I refactored the controller method and added @pathvariable to the method parameter beside String username ...got it working

Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 12:27pm On Nov 15, 2021
richebony:


Ok, I see. If you used spring security for your authentication, authentication.geName() should return the username of the currently logged in user, username here is the username you use for authentication, You can confirm this by logging out the response or placing a breakpoint there if it returns the username of currently logged in user then that step is correct. What I did next was a query to return the User Object using the username as a search parameter. I even see that "customer" is a property in your user class so you can as well just return it (user.getCustomer() will return the customers of the logged-in user which should be a marketer (to ensure this you can use prefilters to make sure only marketers have access to that method , though this is optional ))

Turns out that the authentication.getName method returns null values, then I went further by implementing the findByUsername method in the user Repository but it returns a null object values. I deleted all existing data ,refactored and changed username to userName and changed the Repository method to fndByUserName but it still return null values. Presently stuck here and still debugging.

Attached are the repository and controller images , there is a UserAccountService service class in between that implemented the repo method and provide to the controller.

Thanks

Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 12:18pm On Nov 15, 2021
Singlecliq:
I can’t provide a Java implementation because I don’t develop on Java, but I believe algorithm should suffice.

1. There should be a middleware than only accepts authenticated request.
2. Save authenticated response of the user to the state.
2. Get the name of the authenticated user.
4. Fetch the customer table with the name, which is the marketer name in this case.

Thanks duly appreciated
Programming / Re: SQL Query That Displays A List Assigned Only To Only The Logged In User Java by sweetguy10(m): 5:28pm On Nov 12, 2021
richebony:
Ok
Maybe you can try the attached code

I tried running the code but it came back with an empty array response after inspecting the console. I made sure that I logged in with a Marketer type role and spring security detected Authorities type Marketer. Could it be from the authentication.getName parameter of the security context because in my user class what I have is firstName and lastName variables not Name variable ? I plan to refactor and change the first and last name variables to just Name . Do you think that should fix it ?

Thanks for your support Jah bless

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 58 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 89
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.