설치 종료

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 6분
  • 설치 엑시트는 Java로 돌아가기 전에 스크립트를 호출하기 위해 Java에서 나가는 사용자 정의입니다.

    주:
    여기에 설명된 기능에는 관리자 역할이 필요합니다.

    사용 가능한 설치 종료

    다음으로 이동 시스템 정의 > 설치 종료. 일부 설치 종료 이름(Login, Logout, ValidatePassword, ExternalAuthentication)은 예약되어 있으며 변경할 수 없습니다. 다른 설치 엑시트는 기본 설치 엑시트의 스크립트를 대체하는 사용자 정의 스크립트로 이를 대체할 수 있습니다.

    기본 시스템에서 다음 설치 엑시트를 사용할 수 있습니다.

    설치 종료 설명
    로그인 사용자 이름과 암호 쌍을 가져오고 사용자 객체로 인증합니다.
    로그아웃 로그아웃 시 사용자를 시작 페이지로 안내합니다. LogoutRedirect로 재정의할 수 있습니다.
    로그아웃 리디렉션 로그아웃 시 사용자를 지정된 URL로 이동시킵니다.
    외부 인증 헤더, 매개변수 또는 쿠키를 사용하여 인증합니다. DigestSingleSignOn 및 PGPSingleSignOn에 의해 재정의될 수 있습니다.
    다이제스트SingleSignOn 헤더, 매개변수 또는 쿠키를 사용하여 인증하고 다이제스트 암호화를 해독합니다.
    PGPSingleSignOn 헤더, 매개변수 또는 쿠키를 사용하여 인증하고 PGP 암호화를 해독합니다.
    암호 확인 릴리스부터 Helsinki 기본적으로 활성화되고, 고객만의 암호 확인을 정의할 수 있으며, ValidatePasswordStronger로 재정의할 수 있습니다.
    ValidatePasswordStronger 암호는 8자 이상이어야 하며 숫자, 대문자 및 소문자를 포함해야 합니다.
    GetIntegrationSessionTimeout 기본 통합 세션 시간 제한 동작을 구현합니다.

    로그인 수정

    로그인 설치 엑시트에 대한 다음 수정은 사용자가 로그인할 때 각 사용자의 세션 제한시간 값을 설정합니다. 이 예에서 사용자 이름이 admin인 경우 세션은 30초 후 시간 초과로 설정됩니다.

    gs.include("PrototypeServer");
     
    var Login = Class.create();
    Login.prototype = {
    	initialize : function() {
    	},
     
            process : function() {
              // the request is passed in as a global
              var userName = request.getParameter("user_name");
              var userPassword = request.getParameter("user_password");
     
              var authed = GlideUser.authenticate(userName, userPassword);
              if (authed) {
                 // ***********************************************************        
                 // customization - if the userName == admin, set the session
                 // timeout to be 30 seconds. You can implement your own  
                 // session timeout algorithm here by checking to see if a user
                 // belongs to a certain group or has a certain role.
                 // Values of setMaxInactiveInterval exceeding 1440 minutes are
                 // treated as one day (1440 minutes).
      
               if (userName == "admin") {
                   request.getSession().setMaxInactiveInterval(30);
                 }
                 // ************************************************************
                 return GlideUser.getUser(userName);
              }
     
              this.loginFailed();
     
              return "login.failed";
            },
     
            loginFailed : function() {
              var message = GlideSysMessage.format("login_invalid");
              var gSession = GlideSession.get();
              gSession.addErrorMessage(message);
     
              var userName = request.getParameter("user_name");
              EventManager.queue("login.failed", "", userName, "");
           }
     
    }

    IP 주소에 따라 세션 시간 제한을 설정할 수도 있습니다.

    gs.include("PrototypeServer");
     
    var Login = Class.create();
    Login.prototype = {
    	initialize : function() {
    	},
     
            process : function() {
              // the request is passed in as a global
              var userName = request.getParameter("user_name");
              var userPassword = request.getParameter("user_password");
     
              var authed = GlideUser.authenticate(userName, userPassword);
              if (authed) {
     
              // **************************************************************
              // customization - if the user is logging in from a particular IP
              // range starting with XXX.XXX you can implement your own
              // session timeout algorithm here by checking the login IP
              // 
              // Values of setMaxInactiveInterval exceeding 1440 minutes are
              // treated as one day (1440 minutes).
     
              var clientIP = gs.getSession().getClientIP().toString();
    
              // if client IP starts with specified range
              if (clientIP.indexOf('XXX.XXX') == 0) {  
                 // set to 10 hours
                 request.getSession().setMaxInactiveInterval(60 * 60 * 10); 
              }
              // ***************************************************************
     
                 return GlideUser.getUser(userName);
              }
     
              this.loginFailed();
     
              return "login.failed";
            },
     
            loginFailed : function() {
              var message = GlideSysMessage.format("login_invalid");
              var gSession = GlideSession.get();
              gSession.addErrorMessage(message);
     
              var userName = request.getParameter("user_name");
              EventManager.queue("login.failed", "", userName, "");
           }
     
    }