Package com.inrupt.client.spring
Class SessionUtils
java.lang.Object
com.inrupt.client.spring.SessionUtils
A utility class for converting Spring constructs into session objects for use with the Java Client libraries.
-
Method Summary
Modifier and TypeMethodDescriptionasSession
(OAuth2User user) Convert a SpringOAuth2User
to aSession
object.asSession
(OAuth2User user, Function<String, Session> mapping) Convert a SpringOAuth2User
to aSession
object.
-
Method Details
-
asSession
Convert a SpringOAuth2User
to aSession
object.This method uses the
OpenIdSession
library to create a Session- Parameters:
user
- the Spring user object- Returns:
- the session, if present and unexpired
-
asSession
Convert a SpringOAuth2User
to aSession
object.- Parameters:
user
- the Spring user objectmapping
- a mapping function for creating a Session from an ID token- Returns:
- the session, if present and unexpired
-