In order to use spring-security-pac4j to login to facebook, you need the following maven-artifacts:
```xml
-
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>spring-security-pac4j</artifactId>
<artifactId>pac4j-oauth</artifactId>
<version>1.7.1</version>
</dependency>
-
```
## Configuration of Spring-Security (Without Social Login via pac4j)
This is a bare minimal configuration to get the form-login via Spring-Security working:
```xml
-
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
</security:authentication-manager>
</beans>
-
```
The `http` defines, that the access to the url `/home.html` is restriced and must be authenticated via a form-login on url `/login.html`.
To enable pac4j alongside, you have to add/change the following:
```xml
-
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
<bean id="sas" class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy"/>
</beans>
-
```
In short:
So, here is, what you have to do to fix this [broken example](http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#maven-config-https "Jump to the example in the documentation of the jetty-maven-plugin"): the content shown for the file `jetty.xml` in the example is wrong. It has to look like the other example-files. That is, ith has to start with a `<Configure>`-tag. The corrected content of the file looks like this:
```html
-
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
</Call>
-->
</Configure>
-
```
## But it's not running!
-If you are getting the error `[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.0.5.v20130815:run (default-cli) on project FOOBAR: Failure: etc/jetty.keystore (file or directory not found) -> [Help 1]` now, this is because you have to create/get a certificate for your HTTPS-Connector. For development, a selfsigned certificate is sufficient. You can easily create one like back in the [good old `maven-jetty-plugin`-times](http://mrhaki.blogspot.de/2009/05/configure-maven-jetty-plugin-for-ssl.html "Example for configuring the HTTPS-Connector of the old maven-jetty-plugin"), with this command: `keytool -genkey -alias jetty -keyalg RSA -keystore src/test/resources/jetty.keystore -storepass secret -keypass secret -dname "CN=localhost"`. Just be sure, to change the example file `jetty-ssl.xml`, to reflect the path to your new keystore file and password. Your `jetty-ssl.xml` should look like:
+If you are getting the error `[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.0.5.v20130815:run (default-cli) on project FOOBAR: Failure: etc/jetty.keystore (file or directory not found) -> [Help 1]` now, this is because you have to create/get a certificate for your HTTPS-Connector. For development, a selfsigned certificate is sufficient. You can easily create one like back in the [good old `maven-jetty-plugin`-times](http://mrhaki.blogspot.de/2009/05/configure-maven-jetty-plugin-for-ssl.html "Example for configuring the HTTPS-Connector of the old maven-jetty-plugin"), with this command:
-```html
+```bash
+keytool -genkey \
+ -alias jetty \
+ -keyalg RSA \
+ -keystore src/test/resources/jetty.keystore \
+ -storepass secret \
+ -keypass secret \
+ -dname "CN=localhost"
+```
+
+Just be sure, to change the example file `jetty-ssl.xml`, to reflect the path to your new keystore file and password. Your `jetty-ssl.xml` should look like:
+```html
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
</New>
</Configure>
-
```
## But it's still not running!
You have to change `jetty-http.xml` like this:
```html
-
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
</Call>
</Configure>
-
```
... and `jetty-https.xml` like this:
```html
-
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
</Arg>
</Call>
</Configure>
-
```
Now, it should be running, _but..._
Simple open the file `wp-includes/default-filters.php` of you wordpress-installation and comment out the following line:
```html
-
addfilter('the_content', 'wpautop');
-
```
If you are building your own wordpress-theme - like me - you alternatively can add the following to the `functions.php`-file of your theme:
```html
-
remove_filter('the_content', 'wpautop');
-
```
## Why you should disable automatic paragraph tags
#### Example 01: Markup
```html
-
<!DOCTYPE html>
<title>Example 01</title>
<header>
<footer>
<h2>Footer</h2>
</footer>
-
```
#### Example 01: Outline
#### Example 02: Markup
```html
-
<!DOCTYPE html>
<title>Example 02</title>
<header>
</main>
<footer>
<header><h2>Footer</h2></header>
-
```
#### Example 02: Outline
#### Example 03: Markup
```html
-
<!DOCTYPE html>
<title>Example 03</title>
<header>
<footer>
<header><h2>Footer</h2></header>
</footer>
-
```
#### Example 03: Outline
#### Example 04: Markup
```html
-
<!DOCTYPE html>
<title>Example 04</title>
<article>
</section>
</section>
</main>
-
```
#### Example 04: Outline
#### Example 05: Markup
```html
-
<!DOCTYPE html>
<title>Example 05</title>
<h1>Page</h1>
</section>
</section>
</article>
-
```
#### Example 05: Outline
#### Example 06: Markup
```html
-
<!DOCTYPE html>
<title>Example 06</title>
<header>Page</header>
<main>Main</main>
<footer>Footer</footer>
-
```
#### Example 06: Outline
#### Example 07: Markup
```html
-
<!DOCTYPE html>
<title>Example 07</title>
<header><h2>Page</h2></header>
<main><h1>Main</h1></main>
<footer><h3>Footer</h3></footer>
-
```
#### Example 07: Outline
#### Example 08: Markup
```html
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>Example 08</title></head>
<div class="footer"><h3>Footer</h3></div>
</body>
</html>
-
```
#### Example 08: Outline
#### Example 09: Markup
```html
-
<!DOCTYPE html>
<title>Example 09</title>
<h4>h4</h4>
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
-
```
#### Example 09: Outline
#### Example 10: Markup
```html
-
<!DOCTYPE html>
<title>Example 10</title>
<header>
<h3>Footer</h3>
</section>
</footer>
-
```
#### Example 10: Outline
#### Example 11: Markup
```html
-
<!DOCTYPE html>
<title>Example 11</title>
<header>
<h3>Footer</h3>
</section>
</footer>
-
```
#### Example 11: Outline
#### Example 12: Markup
```html
-
<!DOCTYPE html>
<title>Example 12</title>
<header>
<main><h1>Main</h1></main>
<aside><h1>Aside</h1></aside>
<footer><h1>Footer</h1></footer>
-
```
#### Example 07: Outline
#### Example 12: Markup
```html
-
<!DOCTYPE html>
<title>Example 13</title>
<header>
<main>Main</main>
<aside>Aside</aside>
<footer>Footer</footer>
-
```
#### Example 07: Outline
#### Example 14: Markup
```html
-
<!DOCTYPE html>
<title>Example 14</title>
<header>
<h3>Footer</h3>
</section>
</footer>
-
```
#### Example 14: Outline