smt-spring-security-parent

This is the parent project that groups all the smt-spring-security projects.

Лицензия

Лицензия

Категории

Категории

Безопасность
Группа

Группа

com.github.shiver-me-timbers
Идентификатор

Идентификатор

smt-spring-security-parent
Последняя версия

Последняя версия

1.6
Дата

Дата

Тип

Тип

pom
Описание

Описание

smt-spring-security-parent
This is the parent project that groups all the smt-spring-security projects.
Система контроля версий

Система контроля версий

https://github.com/shiver-me-timbers/smt-spring-security-parent

Скачать smt-spring-security-parent

Имя Файла Размер
smt-spring-security-parent-1.6.pom 3 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.shiver-me-timbers/smt-spring-security-parent/ -->
<dependency>
    <groupId>com.github.shiver-me-timbers</groupId>
    <artifactId>smt-spring-security-parent</artifactId>
    <version>1.6</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.shiver-me-timbers/smt-spring-security-parent/
implementation 'com.github.shiver-me-timbers:smt-spring-security-parent:1.6'
// https://jarcasting.com/artifacts/com.github.shiver-me-timbers/smt-spring-security-parent/
implementation ("com.github.shiver-me-timbers:smt-spring-security-parent:1.6")
'com.github.shiver-me-timbers:smt-spring-security-parent:pom:1.6'
<dependency org="com.github.shiver-me-timbers" name="smt-spring-security-parent" rev="1.6">
  <artifact name="smt-spring-security-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.github.shiver-me-timbers', module='smt-spring-security-parent', version='1.6')
)
libraryDependencies += "com.github.shiver-me-timbers" % "smt-spring-security-parent" % "1.6"
[com.github.shiver-me-timbers/smt-spring-security-parent "1.6"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

  • smt-spring-security-jwt
  • smt-spring-security-stormpath

smt-spring-security-parent

Build Status Coverage Status Maven Central

This is the parent project that groups all the smt-spring-security libraries.

Libraries

smt-spring-security-jwt

This library will automatically enable stateless JWT authentication for any Spring Security configuration.

Usage

Annotation

@EnableWebSecurity
// Just add this annotation and configure Spring Security how ever you normally would.
@EnableJwtAuthentication
public class JwtSecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Override
    protected final void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests().anyRequest().authenticated();
        http.formLogin().loginPage("/signIn").defaultSuccessUrl("/").permitAll();
        http.logout().logoutUrl("/signOut").logoutSuccessUrl("/");
    }

    @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
    }
}

Adaptor

@EnableWebSecurity
public class JwtApplySecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Override
    protected final void configure(HttpSecurity http) throws Exception {
        // Just apply this adaptor and configure Spring Security how ever you normally would.
        http.apply(jwt());
        http.formLogin().loginPage("/signIn").defaultSuccessUrl("/").permitAll();
        http.logout().logoutUrl("/jwt/signOut").logoutSuccessUrl("/");
    }

    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
    }
}

Версии библиотеки

Версия
1.6
1.5
1.4
1.3
1.2
1.1
1.0