Class VaadinSessionSubjectStore

java.lang.Object
com.svenruppert.jsentinel.authorization.vaadin.VaadinSessionSubjectStore
All Implemented Interfaces:
com.svenruppert.jsentinel.authorization.api.SubjectStore

public final class VaadinSessionSubjectStore extends Object implements com.svenruppert.jsentinel.authorization.api.SubjectStore
Default SubjectStore implementation backed by VaadinSession.

Stores the subject as a session attribute keyed by its class type.

  • Constructor Details

    • VaadinSessionSubjectStore

      public VaadinSessionSubjectStore()
      Creates a new instance.
  • Method Details

    • currentSubject

      public <T> Optional<T> currentSubject(Class<T> subjectType)
      Specified by:
      currentSubject in interface com.svenruppert.jsentinel.authorization.api.SubjectStore
    • setCurrentSubject

      public <T> void setCurrentSubject(T subject, Class<T> subjectType)
      Specified by:
      setCurrentSubject in interface com.svenruppert.jsentinel.authorization.api.SubjectStore
    • deleteCurrentSubject

      public <T> void deleteCurrentSubject(Class<T> subjectType)
      Specified by:
      deleteCurrentSubject in interface com.svenruppert.jsentinel.authorization.api.SubjectStore