gluu
クラス | 公開メンバ関数 | 非公開変数類 | 全メンバ一覧
org.xdi.oxauth.session.ws.rs.CheckSessionStatusRestWebServiceImpl クラス
org.xdi.oxauth.session.ws.rs.CheckSessionStatusRestWebServiceImpl 連携図
Collaboration graph

クラス

class  CheckSessionResponse
 

公開メンバ関数

Response requestCheckSessionStatus (@Context HttpServletRequest httpRequest, @Context HttpServletResponse httpResponse, @Context SecurityContext securityContext) throws IOException
 

非公開変数類

Logger log
 
SessionIdService sessionIdService
 
Identity identity
 

詳解

著者
Yuriy Movchan
バージョン
August 9, 2017

関数詳解

◆ requestCheckSessionStatus()

Response org.xdi.oxauth.session.ws.rs.CheckSessionStatusRestWebServiceImpl.requestCheckSessionStatus ( @Context HttpServletRequest  httpRequest,
@Context HttpServletResponse  httpResponse,
@Context SecurityContext  securityContext 
) throws IOException
inline
67  {
68  String sessionIdCookie = sessionIdService.getSessionIdFromCookie(httpRequest);
69  log.debug("Found session '{}' cookie: '{}'", SessionIdService.SESSION_ID_COOKIE_NAME, sessionIdCookie);
70 
71  CheckSessionResponse response = new CheckSessionResponse("unknown", "");
72 
73  SessionId sessionId = sessionIdService.getSessionId(sessionIdCookie);
74  if (sessionId != null) {
75  response.setState(sessionId.getState().getValue());
76  response.setAuthTime(sessionId.getAuthenticationTime());
77 
78  String sessionCustomState = sessionId.getSessionAttributes().get(SessionIdService.SESSION_CUSTOM_STATE);
79  if (StringHelper.isNotEmpty(sessionCustomState)) {
80  response.setCustomState(sessionCustomState);
81  }
82  }
83 
84  String responseJson = ServerUtil.asJson(response);
85  log.debug("Check session status response: '{}'", responseJson);
86 
87  return Response.ok().type(MediaType.APPLICATION_JSON).entity(responseJson).build();
88  }
SessionId getSessionId()
Definition: SessionIdService.java:360
SessionIdService sessionIdService
Definition: CheckSessionStatusRestWebServiceImpl.java:48
Logger log
Definition: CheckSessionStatusRestWebServiceImpl.java:45
void setState(SessionIdState state)
Definition: SessionId.java:124
String getSessionIdFromCookie(HttpServletRequest request)
Definition: SessionIdService.java:237

メンバ詳解

◆ identity

Identity org.xdi.oxauth.session.ws.rs.CheckSessionStatusRestWebServiceImpl.identity
private

◆ log

Logger org.xdi.oxauth.session.ws.rs.CheckSessionStatusRestWebServiceImpl.log
private

◆ sessionIdService

SessionIdService org.xdi.oxauth.session.ws.rs.CheckSessionStatusRestWebServiceImpl.sessionIdService
private

このクラス詳解は次のファイルから抽出されました: