統一アイデンティティ認証(CAS)クライアントテスト取得情報コード

2220 ワード

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ page  import="org.jasig.cas.client.util.AbstractCasFilter"%>

<%@ page  import="org.jasig.cas.client.validation.Assertion"%>

<%

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

Assertion assertion1=(Assertion)session.getAttribute(AbstractCasFilter.CONST_CAS_ASSERTION);

if (assertion1!=null){

    

}

String ssoid=null;

        if (assertion1 != null) {

            ssoid = assertion1.getPrincipal().getName();

        }

%>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <base href="<%=basePath%>">

    <script type="text/javascript">

        basePath='<%=basePath%>';

    </script>    

    <title>My JSP 'TestSSOClientStatus.jsp' starting page</title>

    

    <meta http-equiv="pragma" content="no-cache">

    <meta http-equiv="cache-control" content="no-cache">

    <meta http-equiv="expires" content="0">    

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="This is my page">

    <!--

    <link rel="stylesheet" type="text/css" href="styles.css">

    -->



  </head>

  

  <body>

    SSO Say:<%=ssoid%>

  </body>

</html>