Тёмный

OAuth2 and OpenID Connect | Authorization Server with Spring Security 1 

The Dev World - by Sergio Lema
Подписаться 13 тыс.
Просмотров 22 тыс.
50% 1

In this video I will compare the OAuth2 and OpenID Connect authentication protocols. I will implement the OpenID Connect with the Spring Security Authorization Server.
This video belongs to a playlist where I show how to implement an Authorization Server with Spring Security: • Authorization Server
Content:
How the OAuth2 protocol works. What are the components of the OAuth2 protocol.
What are the differences between OAuth2 and OpenID Connect (OIDC) protocols.
How to implement the OAuth2 and OpenID Connect protocols with the Authorization Server of Spring Security.
Repository: github.com/ser...
My NEW eBook: sergiolema.dev...
Blog: bit.ly/47ornJL
LinkedIn: bit.ly/41Nn61q
Facebook: bit.ly/47rc9nh
Track the performance of your APIs: bit.ly/4d7C0ny
Trainings: sergiolema.dev...
Icons:
Servers by andriwidodo from NounProject.com
Palm by REVA from NounProject.com
Sunglass by alkhalifi_design from NounProject.com
Pictures by Alice Design from NounProject.com
Login Credentials by myiconfinder from NounProject.com
Person by Valerie Lamm from NounProject.com
Browser by DinosoftLab from NounProject.com

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 122   
@anoozg9565
@anoozg9565 2 года назад
Awesome content...complex topic covered with such clarity thanks
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thank you. I try to be as clear as possible. It's difficult without being boring.
@subaratatubebd
@subaratatubebd Год назад
I think it's a master tutorial for understanding spring security oAuth2 concept. Thanks.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Thanks to you for this message!
@samindaperamuna6392
@samindaperamuna6392 2 года назад
Exactly what I wanted. Thank you!
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
I love when a plan comes together 😅
@wasuvansundararajan6339
@wasuvansundararajan6339 2 года назад
Extraordinary explanation, great
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thanks!
@Usman-bhai5411
@Usman-bhai5411 Год назад
Such a wonderfull content even i have working on keylock but still lot of information
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Thanks. I try my best
@bykalim
@bykalim 2 года назад
Great explanation. Thank you
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
I'm doing my best
@SajjadAhmed-lc2dr
@SajjadAhmed-lc2dr Год назад
i m your fan and subscriber. u nailed this topic man
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Thank you!
@elierescobar7217
@elierescobar7217 2 года назад
hello, very good video. I would like to go deeper into this topic. I'm doing my master's thesis and I have to use oauth2 anyway. How would the same thing be done if I use microservices and a gateway. how could I ask you several questions. Thanks a lot
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thank you for your interest
@mustafaali3741
@mustafaali3741 2 года назад
​@@TheDevWorldbySergioLema Yes, please how would the same thing be done if we use microservices and a gateway. Thanks a lot
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
That's an interesting question. I will try to make a video about this 😉
@cesarpalalia9372
@cesarpalalia9372 2 года назад
Very nice explanation!
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thank you!
@shraddhanahar1998
@shraddhanahar1998 Год назад
Is it possible to give two applications same client id? or will have to register both applications independently?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
You can have two applications using the same client_id. Technically, there is not problem. If you have two instances of the same application running in parallel, they must use the same client_id. If you have two similar applications but have a different behavior, you should use the same realm but different client. If you have two applications with different users and different behavior, you should use different realms and different clients. But as said, technically, you can do whatever you want. It's just a matter of organization and security.
@wayneyu3031
@wayneyu3031 2 года назад
awesome content. please keep going
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thank you. I will try to 😅
@cyper0418
@cyper0418 2 года назад
Hello brother, may I ask you a question? Why do we need two clients here, what are their difference and if I just want to access the protected resource server with some token, can I configure just one client. Especially I don't understand why we need the message-client-oidc here.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Hello. In this video I've created one client server (backend-client), one authorization server (backend-auth) and one resources server (backend-resources). In the client server I've configured two ways to register with the authorization server: with OAuth2 and with OICD. When the OAuth2 authentication finishes, it requests for the OICD scope. The OICD is an overlayer of the OAuth2. This means that it takes advantage of the OAuth2 to get all the information and tokens necessary without requiring the user to insert again the credentials. I hope it's clear enough. In this introduction, you can read a little bit more about OICD, openid.net/specs/openid-connect-core-1_0.html#Introduction.
@zurumogbonda3225
@zurumogbonda3225 Год назад
Awesome! Thanks
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
You're welcome!
@treefrog9392
@treefrog9392 Год назад
I cant figure out how to get the Security chain for the Resource server to work. mvcmatchers isn't in spring security now.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
For the configuration of the new version of Spring Security, you can check how to do it here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-B1SUyu98HvQ.html
@treefrog9392
@treefrog9392 Год назад
@@TheDevWorldbySergioLema thanks, love how clean your content is. No fluff just skills!
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Thank you. The cleaner a code is, the easier it is to read and understand
@shivanshuverma5981
@shivanshuverma5981 Год назад
Great explanation, Consider this : I have two client apps registered in auth server with contexts say /app1 and /app2. Now when I hit /app1 it redirects me to login page, Now when I log in for app1 I don't want to give credentials again for /app2, I want it to automatically authenticate me for app2 as well (vice versa). how can I achieve this sso kinda thing ?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
I think what you need is an API Gateway. The API Gateway authenticates with the Auth Server when first using it. Then redirects to the client 1 or 2 depending on the context used app1 or app2. May this solve your problem?
@danielvai5117
@danielvai5117 Год назад
ClientRegistrationRepository and OAuth2AuthorizedClientRepository - Could not autowire. No beans of ' Rep ' type found. Why?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Maybe you're missing some dependencies, check all what I've used here, github.com/serlesen/authorization-server/blob/chapter_1/backend-client/pom.xml
@danielvai5117
@danielvai5117 Год назад
@@TheDevWorldbySergioLema Use in Configuration WebClientConfig : import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; import org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository; (and other dependencies..) Gradle : implementation("org.springframework.boot:spring-boot-starter-oauth2-client:3.0.0") implementation("org.springframework.boot:spring-boot-starter-security:3.0.0") implementation("org.springframework.boot:spring-boot-starter-web:3.0.0") implementation("org.springframework.boot:spring-boot-starter-webflux:3.0.0") implementation("org.springframework:spring-webflux:6.0.3") implementation("io.projectreactor.netty:reactor-netty:1.1.0") I rewrote the code exactly like yours. But the error is still displayed on them .. Otherwise, everything works.
@danielvai5117
@danielvai5117 Год назад
@@TheDevWorldbySergioLema I completely cloned your project through git and this error remained)) , what is it )
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
I just tried the project again now. Everything works well. I see that your dependencies are newer, maybe some imports changed their location. I did not yet test the new version of those dependencies, I can't help you more.
@andrii_popov
@andrii_popov 2 года назад
It feels natural that client should be a JS app, some SPA app, is it possible to do? client - react app, resource - spring app, authorization - spring app. If possible, what is the flow at the client side?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
I've made a video some time ago where I implement the OAuth2 for a backend application and consumed by a separated frontend application (in React). You can check here the workflow, ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7gWcPWh5WVY.html
@SuperMati2011
@SuperMati2011 Год назад
Great work! Is there a way to get the Authorization code via REST request sending username and password in a body or headers?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Thanks! It will depend on the authorization server used, Github, Google, Facebook, Keycloak... Each one will have a different login page and different endpoints to receive the data.
@tarunbhandari9676
@tarunbhandari9676 Год назад
Sir i am getting this error This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Dec 20 23:05:26 IST 2022 There was an unexpected error (type=Bad Request, status=999).
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
I will need more information to help you
@celesty6687
@celesty6687 Год назад
thank you for this tutorial, i followed it step by step, but now i am wondering how did you run the them and tested them together! can someone tell me please
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
You can download the github project present in the video's description. You must first strat the database (with the available command in the README file), the start the authorozation server, and then the client and resource servers. Then add the users in the database as you need
@rajivkumar-ub6uj
@rajivkumar-ub6uj Год назад
Can you extend this spring authorisation server uses federated authorisation I.e: social login
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
I think yes, never tried. If you try it before me, I will be happy to have your feedback
@skkar2k2
@skkar2k2 Год назад
Nice video. I cloned the repo. But the project you are referring in the video and the one which I cloned looks different.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Check the tag, i use a different tag for each video of the playlist
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
For this video, use the tag chapter_1
@chinmayhegdehere
@chinmayhegdehere 3 месяца назад
I have cloned the project during the project setup I am getting error at WebClient declaration saying it may not have been initialized same in UserRepository and PasswordEncoder
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 3 месяца назад
Do you have more information?
@chinmayhegdehere
@chinmayhegdehere 3 месяца назад
Yeah basically it is asking for initialization of WebClient, UserRepository and Password Encoder variables. If it is initialized to null the error will go but during running it ll show this.userRepository is null
@chinmayhegdehere
@chinmayhegdehere 3 месяца назад
And also have a doubt regarding editing etc/hosts. We have assigned each service with different ports so wont it redirect properly. What is the actual necessity of creating aliases?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 3 месяца назад
This seems to be an error in one dependency. So it's cascading to all other dependencies. Check if there is another error specific to a single depdency.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 3 месяца назад
The necessity of the alias is because the browser will create cookies for a domain after the sign in is successful. If all the domains are localhost (the port is not taken into account), you're overwriting the cookies from the resources server to the client server.
@balajin226
@balajin226 2 года назад
Nice Video. I saw many written doc, But I found your video latest one for Authorization server. Thank You. Shall you please Make video or comment about why, when to use OAUTH2 client, OAUTH2 Server, OAUTH2 SDK ?. Google , Git hub , OKTA credential login authenticate with OAUTH2 client is enough ? Need a authorization server ?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
In fact, you shouldn't need to create an authorization server, there are plenty already available (Google, Facebook, Github...). You may need to create your own Authorization Server if your building an SSO (Single Sign On) system for multiple services. The libraries to use are: OAuth2 client to connect to any OAuth2 credentials provider; OAuth2 Server to create your own Authorization Server; OAuth2 SDK I'm not sure about which library is this one.
@gustavotorresrodriguez2483
@gustavotorresrodriguez2483 2 года назад
Hi Sergio, I write you because I follow your tutorial step by step but in the minute 23:28 of the tutorial when you tried to access to the client, the result should be to redirect to login page of the backend-auth server but in my case I got the follow error message: "There was an unexpected error (type=Bad Request, status=400). [invalid_request] OAuth 2.0 Parameter: redirect_uri" I checked and I can see I have the exact same code, I tried to resolved this issue myself but I couldn't find an anwser about this error. Can you help me please to resolved it? Thanks & Regards
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Hi Gustavo, thank you for following me and for your interest in my work. Are you sure that the URI of your backend-client is correctly added in your backend-auth (checking the HTTP response of backend-auth, you can find the exact URI needed). On the other side, as I indicate on the video, be sure to use aliases for the three backends when working on your localhost (add some redirections on your /etc/hosts), otherwise, backend-auth will think it's his URI and not the URI of backend-client.
@manojr03
@manojr03 2 года назад
Good one.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thank you!
@anahitakarimi9872
@anahitakarimi9872 2 года назад
Hello, I have problem during build of backend-client module, I have got "UnsatisfiedDependencyException" during compiling webClient at message controller, Is there anyone who can help me?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Have you the same dependencies in the pom.xml as in the video? Have you all the annotations and packages scan to allow all the beans being detected? Check the Github repository for more help, github.com/serlesen/authorization-server/tree/chapter_1
@anahitakarimi9872
@anahitakarimi9872 2 года назад
@@TheDevWorldbySergioLema yes i clone the code from github address you mentioned
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
The client requires the authorization server to be UP, as it needs it to validate its requests.
@anahitakarimi9872
@anahitakarimi9872 2 года назад
@@TheDevWorldbySergioLema in here authorization server means "backend-auth" module, Am i right? or is there another step to validate the request ?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Yes, it's the module named backend-auth. No, the requests to backend-client only need backend-auth to be UP.
@sinseyha381
@sinseyha381 Год назад
Could you make a new VDO about Openid connect for authenticate LDAP ?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Yes, this could be a good topic. I will work on it
@maneshipocrates2264
@maneshipocrates2264 2 года назад
Thanks alot. I was hunting for info on how to combine spring auuth. jwt tokens (resource server)? and api-gateway (cloud). Will try to see if it works in my case.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Hope it works for you
@maneshipocrates2264
@maneshipocrates2264 2 года назад
@@TheDevWorldbySergioLema Hopefully. But I want to find out whether I can keep my old design of microservice which involves collecting services via a collector service - because I heard you mention in one of the videos that this may not be necessary when using this spring auth server. say I have services A and B, with service AB kinda a collector. I decide to access endpoints via an API gateway-spring auth server-service AB? Thanks.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
I'm not sure to understand your architecture. What I meant when saying that the service collector is no more necessary (and use an api-gateway instead) is in the state-of-the-art. In particular cases, you may need it. You have two approaches: collectorAB -> auth_server -> service A or api_gateway -> auth_server -> service A. You may have a legacy project or a lot of initial logic, so the initial collector service is necessary (the migration to use an API gateway may be painful), you must balance the benefits and the cost of the migration. I hope I've clarified your doubts
@maneshipocrates2264
@maneshipocrates2264 2 года назад
@@TheDevWorldbySergioLema Thanks alot. I will see how to orgnaize and may be drop another question later. Thanks for the great work,
@maneshipocrates2264
@maneshipocrates2264 2 года назад
Thanks again. I did use your method but included added a security to the gateway client and on my resource server (containing many endpoints). Running the code I get the following error: Parameter 0 of method setFilterChains in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration required a bean of type 'org.springframework.security.oauth2.jwt.JwtDecoder' that could not be found. I was trying to refractor some code written with OAuth2 spring resource server (for authorization) security JWT etc.
@alison8529
@alison8529 2 года назад
Awesome
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thanks Alison!
@Kpiki.abalo12
@Kpiki.abalo12 2 года назад
I find this way of setting the spring authorization server very fancy in this video, but I encountered lot of bugs trying to reproduce the exact codes; because in the Backend-auth project and in the UserAuthenticationConverter of the Config package, the editor complains saying the the method getPassword() is undefined in the UserDto, so I create the getter of password field inside UserDto and the error is gone. But when building the Backend-auth project, the build failed with three errors. These are the errors: 1 - Caused by: org.springframework.beans.factory.beanCreationException: error creating bean with name 'EntityManagerFactory' defined in classPath resource org/springframework/boot/autoConfigure/orm/jpa/HibernateJpaConfiguration.class 2- Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service org.hibernate.engine.jdbc.env.spi.JdbcEnvironnement 3- Caused by: org.hibernate.hibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set I want to also add that I created a docker volume for the 'authdb' postgres database and created the 'auth-usr' with the 'pwd' password as well, but when I try the '\dt' to show the created 'auth_user' Table, the console says there is no relation. Also I realized the the schema.sql is not called from the datasorce of application.yml of Backend-auth project, why shouldn't it ? I thing there comes the errors, but not sure. I just want to know what I'm missing, since I found this video meaningfull. Thanks in advance !
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
First of all, thank for watching the video. About the getters you're missing, you may also miss the Lombok dependency, which builds the getters, setters, constructors and more. About the Dialect not found, i've added the Postgres dependency at the beginning of the video to the backend-auth project. And about the schema.sql, you're right, it's never called from the service at startup, I prefer to run it manually, it avoids running it twice when I already have some data in the database. The other errors seems to be related to the Postgres library which is missing. I hope you can solve the problems now.
@Kpiki.abalo12
@Kpiki.abalo12 2 года назад
You are right, I updated my macos system recently and haven’t reinstalled the lombok. I do it right now and the errors left. Thank u again, you are just like a genius.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Glad it works now!
@javajavelin1
@javajavelin1 Год назад
Why do you need to install lombok? Isn't it enough to include it as dependency in project you're working on and use the right annotations on the class to generate getters and setters?@@Kpiki.abalo12
@АлександрБугримов-о1е
Super )
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
thank you!
@himmelsdj3205
@himmelsdj3205 2 года назад
Thanks
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Thanks to you for following me
@himmelsdj3205
@himmelsdj3205 2 года назад
@@TheDevWorldbySergioLema Yeah, a clean job like this deserve appreciation, especially on a critical matter as application security while spring is renewing its wings about it. Thanks again for the time
@rydmerlin
@rydmerlin Год назад
Spring Security needs a DSL to make this more intuitive because programmatically it’s very obtuse.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Which part are you talking about? For the auth server?
@danjanuspineda4330
@danjanuspineda4330 2 года назад
Hey man can you create a tutorial about Spring ACL its kinda hard topic for someone exploring authentication/authorization thankss love your content
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
I've already done something with the roles, ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZBeyy4Q3nIw.html
@danjanuspineda4330
@danjanuspineda4330 2 года назад
yes thats the one i followed for my application backend and its really efficient, how about ACL do you think do we really need it?
@danjanuspineda4330
@danjanuspineda4330 2 года назад
somehow its very complex to implement
@danjanuspineda4330
@danjanuspineda4330 2 года назад
and its like cover policies in model or entity if it should be updated or just read by users
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
It will depend on your application. If it needs a fine tune authorization. But I think it's very important. You can even have roles and permissions. Permissions attached to methods (read images, write images, read users, write users...) and roles attached to users (customer, reseller, admin, b2b...), then combine the permissions on the roles.
@Kpiki.abalo12
@Kpiki.abalo12 2 года назад
In the application.yml of backend-client service, you set ‘client-id’ : ‘messages-client’ and ‘client-secret’ : secret. But in the securityConfig file of backend-auth service you set in RegisteredClientRepository .clientId(‘messages-client’).clientSecret(‘AnEncryptedPAssword). I just want to ask which encryted password was used there inside the .clientSecret(). I ask this because the backend-client project failed on build saying that it cannot create Bean with name ‘messagesController’, and after checking, it appeared to me that backend-client failed to reach the backend-resources endpoint because it’s still unauthorized. So which password should I put in the .clientSecret() ? The One in the data.sql or that of auth_usr. I tried all that and still unauthorized. I just don’t figure out with which credentials the backend-client is finally authorized from the video. Thanks for clarification.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Hi, in fact, it's the same secret. But as in backend-auth I have a PasswordEncoder, the client-secret is encrypted by default (I use BCrypt). If you prefer to use a plain secret, remove the PasswordEncoder in backend-auth. To obtain the encoded secret, I've created a UnitTest where I encode any string to obtain its encoded value, then use it in the RegisteredClientRepository. I hope it's clear enough.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Maybe it's a typo, I see you use backend-Auth and backend-auth (with upper case and lower case). Did you try to solve this?
@Kpiki.abalo12
@Kpiki.abalo12 2 года назад
No, there is no such typo in the actual code. I tried all I could to run the backend-client but not to avail, I Even tried to edit the /private /etc/hosts file in my local system to avoid acces denied, but that also doesn’t fix it
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
You said that you edited your /etc/hosts to avoid access denied. This file must have root privileges but read access to everyone. In this file you must have 3 alias pointing to localhost. Did you try those alias individually? On the other are you sure you're using the correct grant type, scope on the backend-auth and backend-client? One last point, the backend-auth must first be started before backend-client (in the case you're starting both at the same time or in the reverse order).
@Kpiki.abalo12
@Kpiki.abalo12 2 года назад
Yeah yeah my bad, that was it. I wrongly edited the hosts file, and wasted a whole week for that. Now it is working. Thanks you very much. My next step is to add role to the authentication system using the approach in this video.
@ФедорАндреев-л4с
@ФедорАндреев-л4с 2 года назад
Did anybody try to use authorization server and angular app as oauth2 client?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
I've tried to consume the application with a React frontend, but never with an Angular frontend.
@himmelsdj3205
@himmelsdj3205 2 года назад
Angular is a client side framework, and so it is a consumer just like React, there is no difference if you are good at Angular Interceptors, you can intercept token from headers and map requests' payload just like you wish.
@ФедорАндреев-л4с
@ФедорАндреев-л4с 2 года назад
@@himmelsdj3205 thnx for the reply. I've already solved it by using oidc module for angular.
@eugenek8372
@eugenek8372 Год назад
Could you provide more detailed documentation how to set up KeyCloak service? after louncing project i'm got error : Unable to resolve Configuration with the provided Issuer of "backend-keycloak-auth:8080/auth/realms/my_realm"
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
I've added the alias in the file /etc/hosts. All is described in the README file of the repository
@eugenek8372
@eugenek8372 Год назад
Try to delete containers backend-keycloak-auth, and launch again, probably you will have the same issue.
@eugenek8372
@eugenek8372 Год назад
I'm just add my_realm in keycload, now works. thanks.
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Oh it was the keycloak configuration which was missing. Glad you fixed it
@刘浩-g6w
@刘浩-g6w Год назад
First of all, thank you for your video. I benefited a lot from it. In the process of learning, I met a question, which I would like to ask you auth and resource services are normal, backend-auth:8081 can be accessed normally, but clientId reported the following error when starting, thank you boss Caused by: java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "backend-auth:8081"
@刘浩-g6w
@刘浩-g6w Год назад
解决了,thank you,
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
Thanks to you for following me. Did you add the provider configuration in your client? github.com/serlesen/authorization-server/blob/chapter_1/backend-client/src/main/resources/application.yml
@johncerpa3782
@johncerpa3782 2 года назад
Great explanation. Thanks
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema 2 года назад
Gracias John!
@АлександрМан-в6ъ
How did you get the value for clientSecret? Or can it be encrypted by any encoder?
@TheDevWorldbySergioLema
@TheDevWorldbySergioLema Год назад
I've generated the client secret by myself. It was encrypted in the authorization server with BCrypt, but you can find the raw value in the client server.
Далее
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
Explain it to Me Like I’m 5: Oauth2 and OpenID
47:50
SAML vs OAuth vs OIDC (explained simply!)
20:32
Просмотров 56 тыс.
An Illustrated Guide to OAuth and OpenID Connect
16:36
Просмотров 601 тыс.