Skip to content

simter/simter-reactive-context

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simter-reactive-context

Simter reactive system-context. This package just has one tool class SystemContext. All the unit test is in the class SystemContextTest. Run test by mvn test.

The base technique is from reactor's official document "Adding a Context to a Reactive Sequence".

SystemContext functions

fun getAuthenticatedUser()                : Mono<Optional<User>>
fun hasAnyRole(vararg roles: String)      : Mono<Boolean>
fun hasAllRole(vararg roles: String)      : Mono<Boolean>
fun verifyHasAnyRole(vararg roles: String): Mono<Void>
fun verifyHasAllRole(vararg roles: String): Mono<Void>

Installation

<dependency>
  <groupId>tech.simter.reactive</groupId>
  <artifactId>simter-reactive-context</artifactId>
  <version>1.0.0</version>
</dependency>

Requirement

  • Maven 3.6+
  • Kotlin 1.3+
  • Reactor 3+

Build

mvn clean package

About

Simter reactive system-context

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages