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(org.springframework.security.oauth2.core.user.OAuth2User user) Convert a SpringOAuth2Userto aSessionobject.asSession(org.springframework.security.oauth2.core.user.OAuth2User user, Function<String, Session> mapping) Convert a SpringOAuth2Userto aSessionobject. 
- 
Method Details
- 
asSession
public static Optional<Session> asSession(org.springframework.security.oauth2.core.user.OAuth2User user) 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
public static Optional<Session> asSession(org.springframework.security.oauth2.core.user.OAuth2User user, Function<String, Session> mapping) 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
 
 
 -