--
You received this message because you are subscribed to the Google Groups "pac4j-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="vaadin-uitest" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>assembly</display-name>
<context-param>
<description>
Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<listener>
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>
<filter>
<filter-name>ShiroFilter</filter-name>
<filter-class>org.apache.shiro.web.servlet.IniShiroFilter</filter-class>
</filter>
<!-- Make sure any request you want accessible to Shiro is filtered. /*
catches all -->
<!-- requests. Usually this filter mapping is defined first (before all
others) to -->
<!-- ensure that Shiro works in subsequent filters in the filter chain: -->
<filter-mapping>
<filter-name>ShiroFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
</web-app>
Then I had to implement my own realm in order to validate user connection (with db request to get the informations). And finally in my login page, just retrieving the current subject, and call the login method.
I tried changing the shiro.ini file with something like this :
[main]
Google2Client = org.pac4j.oauth.client.Google2Client
Google2Client.key = xxx
Google2Client.secret = xxx
clients = org.pac4j.core.client.Clients
clients.callbackUrl = http://localhost:8080/myorpheostudio-ui/
clients.clientsList = $Google2Client
clientsFilter = io.buji.pac4j.ClientFilter
clientsFilter.clients = $clients
clientsRealm = io.buji.pac4j.ClientRealm
clientsRealm.defaultRoles = ROLE_USER
clientsRealm.clients = $clients
subjectFactory = io.buji.pac4j.ClientSubjectFactory
securityManager.subjectFactory = $subjectFactory
clientsFilter = io.buji.pac4j.ClientFilter
clientsFilter.clients = $clients
clientsFilter.failureUrl = /error500.jsp
clientsRealm = io.buji.pac4j.ClientRealm
clientsRealm.defaultRoles = ROLE_USER
clientsRealm.clients = $clients
subjectFactory = io.buji.pac4j.ClientSubjectFactory
securityManager.subjectFactory = $subjectFactory
In the browser I can see communications with the google servers (with 302 and 200 codes which sounds ok) but cannot get to my views with a nice error like : "Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js?v=7.5.7"
I'm a bit lost on where should I start looking...
Thanks
private static final String INI_RESOURCE_PATH = "classpath:shiro.ini";
private static SecurityManager securityManager = managerFromIni();
private static SecurityManager managerFromIni() {
IniSecurityManagerFactory iniSecurityManagerFactory = new IniSecurityManagerFactory(INI_RESOURCE_PATH);
DefaultSecurityManager manager = (DefaultSecurityManager) iniSecurityManagerFactory.getInstance();
So I wonder if I could define my client in the shiro.ini file instead of using the ConfigFactory.
I'm also a bit confuse about my realm, but I'll see that after..
Thanks again !!
Fred
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users+unsubscribe@googlegroups.com.