Pankaj Shet

Ranch Hand
+ Follow
since Sep 08, 2006
Pankaj likes ...
Scala Spring Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
7
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pankaj Shet

Hi Ranchers,

Hope every one is doing fine in their lives...
It has been a long time since I last visited this forum.!
Javaranch has always been a goto forum for me rather than any other forums for any java related issue, and am happy to be back after so long time..!

I am currently working on Quarkus framework where I am creating an OIDC integration with Okta and am following the Authorization Code Flow!

here is the complete detail of the flow and am currently stuck at:
1) Registered a web app integration with OKTA provider from where we get the details like clientId, clientSecret, clientName, Authorize Endpoint URL, UserInfo URL Token URL.
   It also consists of
    - sign in redirect url - which is a login callback.

1) User /User browser agent sends a request to a REST endpoint which redirects to an Authorize Endpoint:
2) Authorize endpoint - Endpoint consist of 6 parameters
-clientId
-grant type.
-scope
-redirect-uri
-state
-nonce

3)If the user is not signed in, Okta should send the Login form or page to the user browser asking the user to enter user/password and give consent.
4) Once the user gives consent, and the user is authentication, it verifies the consent and returns "code" and "state"  parameters.
5) The code is than exchanged with Authorisation Server's with token endpoint for ID Token.


I tried to implement it in the following way:

Authorise Url:

   

Configuration in application.properties:


 

So now I am hitting the url:
http://localhost:8080/api/user/authorise which redirects the browser to the OKTA server app using the OIDC Compliant Authorize URL as follows:

https://dev-72806982.okta.com/oauth2/v1/authorize?clientId=0oa6poeyh6dX58xQn5d7&scope=openid&response_type=code&redirect_uri=https://dev-72806982.okta.com/enduser/callback&response_mode=fragment&state=PUhK0dJqP&nonce=tsvxgewnft

So URL->my authorise endpoint to okta authorise url endpoint redirection happens smoothly.

Since the user is not authenticated, Okta server should sent me the Okta enabled sign in page for entering the credentials and user consent,  it is not happening and I am getting 400 BadRequestException.

Can any body help me get the above issue resolved?

Okta app configuration is as follows: consist of

client ID,
client Secret,
grant type- authorization code,
User consent-require consent,
sign in redirect url: https://dev-72806982.okta.com/enduser/callback,
login initiated by:  Either Okta or App,
login flow : Redirect to app to initiate login (OIDC Compliant)
initiate login uri:  https://dev-72806982.okta.com/enduser/callback

help is aways appreciated.

Regards.
-Pankaj.
Hi Ranchers,

I wish to build an application which will run in an On-Prem  Vm and will connect to various clouds pulling their Infrastructural Details using the login details
I wish to fetch the infrastructure details without deploying this current app.

What framework do you suggest?

How to approach this particular use case?

I tried to do it using Spring cloud. But region detection needs me to deploy that App on AWS EC2 which is not what I want.  

Request your help.

Regards,
-Pankaj.





3 years ago
Hi Monica,

Scala do have Functional Interfaces like Java 8 in form of Function0, Function1 until Function22.. which take 0, 1..22 parameters respectively.
The return type of the Scala Lambda can be one of these 22 Functions.
They are not Functional Interfaces but they are traits something similar to interfaces.
These 22 traits also have a single abstract method(apply with equivalent number of parameters i.e. 0,1,...22)  similar to functional interfaces in Java 8.
They can be found in the package named scala.

Hope this gives a clear picture of how scala lambdas work.

Regards,
-Pankaj.

 
4 years ago
Hi Ranchers,

I have 9+ Years of Software Developement Experience and am a very passionate about working in the latest trends with Contineous Learning.

I am looking out for the first job as freelancer.


Experience and Expertise
----------------------
Backend      -      Java, JSP, Servlets, Spring(Core, MVC, JMS(ActiveMQ), JDBC, MyBatis), Spring Boot
Frontend     -      JavaScript EXTJS/ VueJS.  
Databases   -      MySQL and Oracle.

Have knowledge on reactive programming frameworks like Spring WebFlux and Axon Framework(Reactive Microservices) as well.  

Have Good knowledge of Scala language(OOP as well as Functional Programming)
Learning and looking to get hands on experience on Spark, Kafka, Cassandra,    
Am a Lightbend Certified Reactive Architect - A certification is all about DDD, Reactive Microservices and Software Architecture.
Passionate about building reactive systems using (Akka/ Play/Lagom.)
Passionate about Clojure as well.

Please let me know if there is any freelance work for me.

My Contact Info:

Email Id: pankaj"dot"shet123"at"gmail"dot"com
Mobile no: +91-9819318776.

Regards,
-Pankaj.


4 years ago
Hi Ranchers,

Hope every thing is going well.

What do you guys think about the lightbend certified reactive architect certification?

Why is it not getting so popular yet like AWS and Others?

Have a look at this : Lightbend Certified Reactive Architect

Regards,
-Pankaj.
Thanks Mathew for this Answer. But do you mean Migration will not help much?

I feel that javascript frameworks will be much lighter compared to JSPs.
JSP is a server side rendering. JSPs will be converted into servlets, and then they will be rendered.
Hence, render perfomance is slow in case of JSPs.
Javascript frameworks will be Client Side rendering, hence performance will be much faster.

Apart from the above, How are JSP's advantageous over Javascript frameworks?

Regards,
-Pankaj.


Hello Guys,

I was able to clear the 'Lightbend Certified reactive architect' exam 2 weeks back.

This has helped me a lot for understanding what really is reactive systems.

Regards,
-Pankaj.
4 years ago
Hi Ranchers,

I have a small question regarding the above topic.

How is the migration of spring mvc with jsp (JSTL) to spring boot Javascript frameworks(Angular /Reactjs/Vuejs) helpful?

What are the advantages of doing so?

Regards,
-Pankaj.
Thanks a Lot for your reply Junilu,

But if there are three instances getting created, if there are three constants, than that's not the singleton.  There must be the way to restrict enums to create a single instance irrespective of number of ENUM Constants.

Otherwise I can definately create the singleton object using class by creating just a single object of that class in the same way I create the single ENUM constant, without writing any additional code of restricting that class?

What's your say?



Hi Ranchers,

It is said that Enum singletons are the best way way to create singletons.

How ever I have one doubt.

Writing Enum Singleton is very simple.

Eg.


and we access it in the following way,

SingletonInstance.INSTANCE.doStuff();


However,

If we write two or more Enum Constants like:



doStuff() is accessible by all 3 INSTANCEs?

there are 2 possibilities:

1) 3 different Instances are created
2) Still at any point of time, irrespective of number of constants, only single instance is created?

If the 2nd possibility is true, then its a true singleton.

but if 1st possibility is true, Its like we are creating just one instance of the ENUM and saying its a singleton.

There should be a way to restrict the no of constants in the ENUM, to one and only one and not more than one to make the ENUM a Singleton.

I request your opinion on the same.

Regards,
-Pankaj.

Also if there is anything better other than AWS kindly suggest. IBM BLUEMIX, AWS, ORACLE CLOUD, OPENSHIFT, AZURE, GCP, Salesforce etc.. Whichever cloud technology certification is the hottest in the market kindly suggest.

Regards,
-Pankaj.
5 years ago
Hi Ranchers,

If anybody is AWS certified Devops professional, I request you please help me with the detailed preparation approach.

Where should I start? Which path to follow? Etcc..
Is this certification really valuable in the market?

Regards,
-Pankaj.
5 years ago