Spring Boot Drupal authentication

Supports authentication with Spring Security against Drupal

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

de.dehn
ArtifactId

ArtifactId

spring-boot-drupal-authentication
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Boot Drupal authentication
Supports authentication with Spring Security against Drupal
Project URL

Project URL

https://github.com/dehn-und-soehne/spring-boot-drupal-authentication
Source Code Management

Source Code Management

https://github.com/dehn-und-soehne/spring-boot-drupal-authentication.git

Download spring-boot-drupal-authentication

How to add to project

<!-- https://jarcasting.com/artifacts/de.dehn/spring-boot-drupal-authentication/ -->
<dependency>
    <groupId>de.dehn</groupId>
    <artifactId>spring-boot-drupal-authentication</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/de.dehn/spring-boot-drupal-authentication/
implementation 'de.dehn:spring-boot-drupal-authentication:1.0'
// https://jarcasting.com/artifacts/de.dehn/spring-boot-drupal-authentication/
implementation ("de.dehn:spring-boot-drupal-authentication:1.0")
'de.dehn:spring-boot-drupal-authentication:jar:1.0'
<dependency org="de.dehn" name="spring-boot-drupal-authentication" rev="1.0">
  <artifact name="spring-boot-drupal-authentication" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.dehn', module='spring-boot-drupal-authentication', version='1.0')
)
libraryDependencies += "de.dehn" % "spring-boot-drupal-authentication" % "1.0"
[de.dehn/spring-boot-drupal-authentication "1.0"]

Dependencies

compile (8)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.10
org.springframework : spring-jdbc jar 4.2.4.RELEASE
org.springframework : spring-core jar 4.2.4.RELEASE
org.springframework.security : spring-security-web jar 4.0.3.RELEASE
org.springframework.boot : spring-boot jar 1.3.2.RELEASE
org.springframework.security : spring-security-config jar 4.0.3.RELEASE
javax.servlet : javax.servlet-api jar 3.1.0
org.codehaus.groovy : groovy-all jar 2.4.6

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Spring Boot Drupal authentication

Usage

compile 'de.dehn:spring-boot-drupal-authentication:1.0'

Extend the class DrupalAwareWebSecurityConfiguration:

@Configuration
@EnableWebSecurity
class WebSecurityConfig extends DrupalAwareWebSecurityConfiguration {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
                .antMatchers("/", "/home").permitAll()
                .anyRequest().authenticated()
                .and()
    }
}

The file application.properties could look like that:

drupal.major-version=8
drupal.cookie-name-pattern=SESS.*
drupal.datasource.driver-class-name=com.mysql.jdbc.Driver
drupal.datasource.url=jdbc:mysql://localhost/drupal8?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
drupal.datasource.username=root

Versions

Version
1.0