All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.mvc.security.kipe.expression.kipe-expression.md.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
# Kipe Expression

Kipe can be pronounced, in French, as "qui peut" which means: who can.

It is an authorization evaluation mechanism built on top of spring security. Kipe is there to ease business facing authorization checks.

It will allow you to use a new `can('action', #element)` expression in `@PreAuthorize` and `@PostAuthorize`:

```java
@PreAuthorize("can('update', #dummy)")
public void update(KipeDummy dummy) {
  // ...
}

```

Those expressions will then be evaluated in dedicated `AccessChecker`. To do so, you'll have to define spring beans (`@Component` or `@Service`) implementing `AccessChecker`:

```java
@Component
class KipeDummyAccessChecker implements AccessChecker {

  @Override
  public boolean can(AccessContext access) {
    //TODO: your business authorization logic
  }
}

```

Kipe's only job is to call the `AccessChecker` for your object class.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy