Hello, after we finished our EDF application, the last step we will do is applying security. In this application, I will apply custom security using Java filter security. In that case, you can deploy your ADF application in WebLogic or in glassfish, open source of glassfish. So, to create your security in your ADF application using custom custom way, you will there are some steps you have to create some files you have to create I will go through this files and I will show you how you can do this. You can follow this steps on any ATF application you will develop you can just copy paste this file. So what exactly is a file we will create?
We will create index GCB bitch, this bitch have only one line, which will forward the request to our dashboard. We can index the GCP x images to be x, it will direct you to the login page. This is a login page which we will create. After creating this two pages, we will create a filter using a complimentary Java filter. So this filter actually, what it will do it will catch in a request to your from you the user wants the user access your application on any pages, it will go first to this filter. And from this filter, we can control the security.
Here I will get the request of the beach, the beach request and I will check if the request or the URL from this request. It was indexed to GCP x or login is not in the index. It is not This JSP x and not logging because if it is login, I don't do anything, these are good for the login page. If it is indeed to GCP x, it will forward to the login. So I don't care if the user access index GS makes or login. So if it is not both of them, so I will get the session and I will check if the session is not there is no login at all, I will redirect to the index to GCP x which you will look at which will forwards the request to the login.
If there is a user or sorry if there is a session, I will get value from the session called user name. If it is null, I will point again to the login. Otherwise, I will continue to let the user continue using the page access the page. So this is a symbol filter to tell the totals of a diff application to use This filter you have to add this in to the XML, you have to add the filter, which is a filter name and point to the class and what is the mapping maybe in your request and was used to be or in a request into his GSP x or in request in with JSF it will apply to this filter. So in request her in to this GCP beach in request to access GCP page or his to be exposed to GCP, which it will go through first to the filter filter, we cache this request and the check is it access index GCP x login I don't care if it is not I will come here, check decision.
If decision is not good to look in. Else. I will check the variable from the session if the variable is not good to look in. Otherwise, I will let the user access the bitch. So this is a simple way to apply custom security. So in next video, I will start are creating this file.
So see you next video.