Name

global.PwdResetAPI

Description

Version 1(default) API for the Web service.

Script

var PwdResetAPI = Class.create();

PwdResetAPI.prototype = {

  initialize : function(){
  	
  },
  
  //@TODO - we probebly need to return the session token at the init phase and not on the identity rest call.
  //at this point it's too many changes - (because need to change winapp - so we'll leave it for now)
  initRequest : function(sysparm_language, sysparm_url){
  	
  	var pageInfo = new PwdResetPageInfo();
  
  	return  pageInfo.initRequest(sysparm_language, sysparm_url);
  	
  },
  
  /**
  {
    status: "ok",
    error: "",
    info: {

  	process_id: "",
  	elements: {
  	  identify_breadcrumb: "",
  	  verify_breadcrumb: "",
  	  reset_breadcrumb: "",
  	  input_label: "",
  	  next_button: "",
  	  now_captcha: {
  		captcha_placeholder: "",
  		captcha_label: "",
  		url: ""
  	  }
  	}
    }
  }
  **/
  getIdentifyPageInfo : function(sysparm_url){
  
  	var pageInfo = new PwdResetPageInfo();
  	return pageInfo.getIdentifyPageInfo(sysparm_url);

  },
  
  
/**
{
 status: "ok",
 error : "",
 info : {
    
     user_id : "",                 Need this for sending out email with url ajax call
     email_reset_url : "",         Send out email with reset link if true
     verifications: [
         {
  	       id : "",              ID is absent from Personal Data type. It is found in the questions instead
  		   type : "",            qa|sms|personal_data
  		   elements : [			   
  			   questions: {      Used for QA and Personal Data
  				   id : label
  			   } 
  		   ],
  	   }
     ]
 }
}
**/
  getVerifyPageInfo :function(requestId){
  
  	var pageInfo = new PwdResetPageInfo();
  	return  pageInfo.getVerifyPageInfo(requestId);
  
  },
  
  
  
/**
{
  status : "ok",
  error : "",
  info : {
      auto_generate_pwd : "",
  	lock_state : "",
  	support_unlock : "",
  	wf_refresh_rate : "",
  	wf_time_out : "",
  	elements : {
  		new_pwd_prompt : "",
  		new_pwd_label : "",
  		retype_pwd_label : "",
  		waiting_text : "",
  		submit_button : "",
  		lock_state_alert : "",
  		lock_state_loading : "",
  		lock_state_error: "",
  		account_locked : "",
  		account_not_locked: "",
  		account_locked_warning: "",
  		complexity_rule_hint: "",
  		non_fatal_failure: "",
  		fatal_failure: ""
  	}
  }
}
**/
 getNewPageInfo : function(requestId) {
  
      var pageInfo = new PwdResetPageInfo();
  	return  pageInfo.getNewPageInfo(requestId);
  
  },
  
  /**
{
status: "ok",
error : "",
info: {
  elements: {
    new_pwd: "",
    new_pwd_text: "",
    title : ""
  }
}
}
**/
  getSuccessPageInfo :function(successType, requestId, params) {
  
  	var isGoodRequest = PwdResetRequestHelper.verifyGoodRequest(requestId, successType);
  	if( !isGoodRequest){
  		return {
  			status: PwdConstants.WIN_STATUS_ERROR,
  			error : PwdConstants.WIN_ERROR_TIMEOUT
  		};
  	} 
  	var pageInfo = new PwdResetPageInfo();
  	return pageInfo.getSuccessPageInfo(successType, requestId, params);
  },
  
  /**
{
info: {
  elements": {
    title: "",
    subtitle: ""
    service_desk_text: "",
    content: {} OR null,
    request_label: "",
    request_number: ""
  }
}
}
**/
  getFailurePageInfo : function(error, requestId, sysParamError) {

  	PwdResetRequestHelper.updateRequestStatus(requestId, -1);
  	var pageInfo = new PwdResetPageInfo();

  	return pageInfo.getFailurePageInfo(error, requestId, sysParamError);
  },


  type: 'PwdResetAPI',
  
  
};











  



Sys ID

d9a766db671103008b52f3b457415a64

Offical Documentation

Official Docs: