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 SpringOAuth2Userto aSessionobject.asSession(OAuth2User user, Function<String, Session> mapping) Convert a SpringOAuth2Userto aSessionobject.
-
Method Details
-
asSession
Convert a SpringOAuth2Userto aSessionobject.This method uses the
OpenIdSessionlibrary to create a Session- Parameters:
user- the Spring user object- Returns:
- the session, if present and unexpired
-
asSession
Convert a SpringOAuth2Userto aSessionobject.- Parameters:
user- the Spring user objectmapping- a mapping function for creating a Session from an ID token- Returns:
- the session, if present and unexpired
-