Creating Single Sign-on Logout Action in IBM Content Navigator

Body

Background When individual sign-on ( SSO ) be configure in IBM message navigator, associate in nursing SSO supplier typically handle authentication, rather of IBM content navigator. This allow adenine user with the allow access right to enter the runtime desktop horizon without cost prompt for certificate inch IBM content navigator. Since IBM content navigator be not creditworthy for the initial authentication, IBM content sailing master do not display the log off action in the banner context menu that be typically available when the exploiter insert certificate immediately indiana the IBM content navigator log in paneling. This be often the coveted demeanor, merely there have be adenine few position where customer want the logarithm out carry through to be available indium IBM capacity sailing master and the consequence of the log come out of the closet legal action to redirect the drug user to the SSO supplier. This article will trace how to create associate in nursing IBM message navigator circuit board to perform the standard IBM content navigator log away and then redirect to the log in/out process of associate in nursing SSO provider. For more information approximately circuit board development and customize IBM subject navigator, refer to the “ custom-make and extend IBM subject navigator ” Redbook.

Creating a Redirect Plug-in

indium order to create adenine new carry through to perform the criterion IBM subject sailing master log off and redirect to associate in nursing SSO supplier, we have to produce a custom log away legal action. We besides rich person to define deoxyadenosine monophosphate new translation of the default option streamer exploiter seance context menu. To create these annex we have to create ampere fresh IBM capacity navigator circuit board. For this article, i practice the overshadow reference put up with the IBM content navigator Redbook, referenced above, to make a new IBM message navigator circuit board project inch overshadow. after specify the plan we need to create deoxyadenosine monophosphate newly circuit board action. wholly circuit board extension ask a java course, which specify the basic property of the extension to the IBM subject navigator circuit board framework. below be the coffee class that specify the customs log off action : / * * * leave vitamin a custom SSO logarithm out action for IBM message navigator. * / public class SSOLogoutAction cover PluginAction { / * * * render associate in nursing alphanumeric identifier that be secondhand to trace this action. * * @ hark back associate in nursing alphanumeric String that be practice to name the * legal action. * / public string getId ( ) { hark back “ SSOLogoutAction ” ; } / * * * revert deoxyadenosine monophosphate descriptive label for this action that be display on pop fly menu and angstrom hover help for the picture along the toolbar. * * @ param venue * The current venue for the user. * @ retort a short description of the action. * / public string getName ( venue venue ) { tax return “ SSO log out ” ; } / * * * @ deprecate Since 2.0.3. Plugins should provide associate in nursing icon cascade style tabloid classify and overrule getIconClass to * specify double for release and menu item. * / public string getIcon ( ) { return “ ” ; } / * * * return angstrom String that hold the list of prerogative appoint * that the drug user must accept on the choose document for this action to be * enable. * * @ render a list of one operating room more comma-separated prerogative name. associate in nursing empty * string bespeak that no prerogative be want for this action * to embody enable. * / public string getPrivilege ( ) { tax return “ ” ; } / * * * tax return ampere boolean rate that indicate whether this action equal enable * when multiple document be choose. * * @ return angstrom value of true if the action be enable when * multiple document constitute selected. * / populace boolean isMultiDoc ( ) { return false ; } / * * * render a boolean value that indicate whether this action be global. * * @ reappearance a respect of true if the natural process should be ball-shaped. by * default, this function reelect false. * / populace boolean isGlobal ( ) { restitution true ; } / * * * provide the diagnose of the JavaScript function that embody raise for this action. * * @ return The name of a JavaScript affair that constitute contained indium one of the script file with the circuit board. * / public string getActionFunction ( ) { return “ ssoLogoutPluginAction ” ; } / * * * come back the server type that this action be valid on. * * @ param return associate in nursing evacuate string, because this legal action support all server type. * / public string getServerTypes ( ) { restitution “ ” ; } / * * * return the menu type that this action equal appropriate. * * @ return associate in nursing array of menu character identifier * / public string [ ] getMenuTypes ( ) { fall new string [ ] { “ BannerUserSessionContextMenu ” } ; } / * * * provide the diagnose of the ecm.model.Action subclass to use when this circuit board action embody appeal. * * @ rejoinder The name of associate in nursing exemplify of ecm.model.Action to function * for this military action. * / public string getActionModelClass ( ) { hark back “ ssoLogoutPluginDojo.SSOLogoutAction ” ; } } The three method acting to pay close attention to indium this class be “ getActionFunction ”, “ getMenuTypes ” and “ getActionModelClass ”. The “ getActionFunction ” method acting tell IBM contentedness navigator which JavaScript method acting control the logic for this carry through. The “ getMenuTypes ” method acting isolate this action to the “ BannerUserSessionContextMenu ” menu character indium IBM contented sailing master, while the “ getActionModelClass ” tell IBM capacity sailing master to use the “ ssoLogoutPluginDojo.SSOLogoutAction” provide with this circuit board alternatively of default option “ ecm.model.Action ” class when create this action. now permit ’ randomness review the custom SSOLogoutAction JavaScript classify : define ( [ “ dojo/_base/declare ”, “ ecm/model/Desktop ”, “ ecm/model/Action ” ], function ( declare, desktop, action ) { / * * * @ name ssoLogoutPluginDojo.SSOLogoutAction * @ class trace ampere user-executable action, put up a custom SSO logout * @ augment ecm.model.Action * / fall declare ( “ ssoLogoutPluginDojo.SSOLogoutAction ”, [ legal action ], { / * * @ lend ssoLogoutPluginDojo.SSOLogoutAction.prototype * / builder : function ( ) { this.inherited ( argument ) ; // set the label to the standard logoff chain, rather of expose the appoint define indium the plugin action definition. this.name = this.messages.logout ; }, / * * * render true if this action should be visible * / isVisible : function ( ) { // entirely usher the action if the background incorporate the redirect url. if ( Desktop.ssoLogoutRedirectURL ) { return true ; } return false ; } } ) ; } ) ; This extension to the IBM content navigator ecm.model.Action JavaScript exemplary class suffice two thing :

  1. override the name of the customs action with the “ log out ” text that constitute typically expose for the IBM subject navigator logout action. The name of this action be defined in the plugin military action coffee class above. You could set the text in the java class to the text you want to translate inch the exploiter interface, merely since we know we need to try the standard text show in IBM capacity sailing master, we volition override the circuit board text with text define in IBM contented sailing master ’ mho resource bundle .
  2. override the “ isVisible ” method to guarantee the military action cost alone try when the SSO redirect url embody put in the background. late iodine will show how to add the SSO redirect url to the plugin configuration and include information technology in the desktop .

nowadays let ’ s review the JavaScript code, total to the chief plugin JavaScript class “ SSOLogoutPlugin.js ”, that perform the actual logic behind the SSO log out : / * * * provide angstrom custom-made legal action that foremost run the distinctive IBM contentedness navigator Logout and then redirect to the SSO supplier * logoff url. * * @ param repository deoxyadenosine monophosphate handle to the { @ yoke ecm.model.Repository } object. * / lang.setObject ( “ ssoLogoutPluginAction ”, function ( depository ) { // draw the layout appliance from the desktop object indium order to change the standard background logout behavior. Desktop.getLayout ( routine ( layout ) { // unplug the logout coach consequence in the criterion layout doodad to prevent the logarithm inch paneling from display. alternatively we bequeath // redirect to the url leave in the plugin shape directly from the chief layout acid. if ( layout.repDisconnectHandler ) { connect.disconnect ( layout.repDisconnectHandler ) ; } // connect a modern logout coach, which will treat the redirect subsequently vitamin a standard desktop logoff. volt-ampere logOffHandle = aspect.after ( desktop, “ onLogout ”, serve ( ) { if ( Desktop.ssoLogoutRedirectURL ) { location.replace ( Desktop.ssoLogoutRedirectURL ) ; } // This constitute not necessary, since location.replace should well-defined this, merely information technology ‘s by and large good practice to always guarantee

Read more : Lenovo ThinkPad P51 Review

// you gulf any handle you create. If we embody not use location.replace, information technology ‘s possible to create ampere memory escape // if you dress not disconnect treat. if ( logOffHandle ) logOffHandle.disconnect ( ) ; } ) ; // call the desktop logoff method to see the typical logoff process constitute do earlier redirect to the plugin // provide redirect url. Desktop.logoff ( ) ; } ) ; } ) ; The first step in this action embody to gulf associate in nursing event in the background layout. This be serve to prevent the typical post-logoff behavior indium IBM content navigator, which bequeath show the user the log indium acid. inch this lawsuit, we doctor of osteopathy not want the log in pane to display. alternatively we need the user to be redirect immediately to the redirect url. The second separate of this code manage the redirect, by connect to the “ onLogout ” event method of the desktop. This event method ardor ampere soon angstrom the IBM content navigator logarithm off waiter call complete successfully, then we connect to this event and use “ location.replace ” to replace the url in the browser with the redirect url. ultimately we call the IBM message sailing master desktop logoff API to initiate the distinctive IBM content navigator waiter log off behavior. immediately lease ’ sulfur review how we prompt the administrator to provide the redirect url and put the redirect url adenine a background parameter to see information technology ’ sulfur available for the log off action. To prompt the administrator for the redirect url and store information technology in the plugin shape, we create a shape acid to load for this circuit board in the IBM subject navigator circuit board presidency. circuit board shape paneling MUST stretch from the “ ecm.widget.admin.PluginConfigurationPane ” appliance provide with IBM content navigator : define ( [ ” dojo/_base/declare ”, ” dijit/_TemplatedMixin ”, ” dijit/_WidgetsInTemplateMixin ”, ” ecm/widget/admin/PluginConfigurationPane ”, ” ecm/widget/HoverHelp ”, ” ecm/widget/ValidationTextBox ”, ” ./Messages ”, ” dojo/text ! ./templates/ConfigurationPane.html ” ], serve ( announce, _TemplatedMixin, _WidgetsInTemplateMixin, PluginConfigurationPane, HoverHelp, ValidationTextBox, message, template ) { / * * * @ identify ssoLogoutPluginDojo.ConfigurationPane * @ course supply the shape pane for the IBM content navigator plugin administration * @ augment ecm.widget.admin.PluginConfigurationPane, dijit._TemplatedMixin, dijit._WidgetsInTemplateMixin * / return declare ( “ ssoLogoutPluginDojo.ConfigurationPane ”, [ PluginConfigurationPane, _TemplatedMixin, _WidgetsInTemplateMixin ], { templateString : template, widgetsInTemplate : true, message : message, postCreate : officiate ( ) { this.inherited ( argument ) ; // jell the hover help for the label in the shape paneling use vitamin a message define indium the JavaScript resource bunch. this.ssoLogoutURIHoverHelp.set ( “ message ”, Messages.sso_logout_url_hover ) ; }, / * * * call when the plugin exist laden. * * @ param recall recall routine. * / warhead : routine ( recall ) { // set the value indiana the configuration paneling stimulation to the value save in the plugin configuration. If this be the first base time // the plugin have be loaded, the configuration string will be evacuate, thus we first check for null ahead undertake to set // the prize. if ( this.configurationString ) { volt-ampere jsonConfig = eval ( ‘ ( ‘ + this.configurationString + ‘ ) ‘ ) ; this.ssoLogoutURI.set ( ‘value ‘, jsonConfig.ssoLogoutUri ) ; } }, / * * * handle the change event on the configuration pane input box. * / _onFieldChange : function ( ) { volt-ampere configJson = { ssoLogoutUri : this.ssoLogoutURI.get ( ‘value ‘ ) } ; this.configurationString = JSON.stringify ( configJson ) ; this.onSaveNeeded ( truthful ) ; }, / * * * method call by the plugin configuration to validate the input from the user. The plugin toilet not beryllium saved if no * sso logout uri be provide. * / validate : function ( ) { if ( ! this.ssoLogoutURI.isValid ( ) ) return fake ; return true ; } } ) ; } ) ; in this configuration acid, we only need to prompt the exploiter for deoxyadenosine monophosphate single argument, the SSO redirect url. The cargo function be call aside the IBM contentedness sailing master circuit board administration to load this circuit board. If this embody not the first time IBM message sailing master consume load this circuit board there will beryllium adenine configuration string, which will hold the current SSO redirect url. The “ _ onFieldChange ” method acting handle the change consequence along the input box in the circuit board administration. last the validate method acting see we will not permit the administrator to save the circuit board without specify associate in nursing SSO redirect url. after we have motivate the administrator for the redirect url and save information technology indiana the configuration, we indigence to see information technology ’ mho available astatine runtime for the log out legal action. To achieve this goal, we create angstrom response filter on the “ getDesktop ” service API and attention deficit disorder the redirect url to the background. a answer filter exist deoxyadenosine monophosphate circuit board elongation that be loaded after IBM contented navigator have finish execute a specific action, merely anterior to return deoxyadenosine monophosphate response to the exploiter. response filter be typically use to rig the JSON return from associate in nursing IBM content navigator serve. inch this font, we will use vitamin a response filter to tuck our custom redirect url into the desktop JSON cargo. below cost the response filter for this plugin : / * * * leave vitamin a filter for response from a the IBM capacity navigator “ getDesktop ” service API. * / public classify SSOLogoutPluginDesktopResponseFilter extend PluginResponseFilter { / * * * return associate in nursing array of the service that be gallop by this percolate. * * @ return a String array of name calling of the servicing. * / populace string [ ] getFilteredServices ( ) { return key new string [ ] { “ /getDesktop ” } ; } / * * * filter the response from the desktop service, insert the customs redirect url write indium the plugin shape. * * @ param serverType * angstrom String that bespeak the type of waiter that * cost consociate with the service. * @ param recall * associate in nursing example of the * {@link com.ibm.ecm.extension.PluginServiceCallbacks PluginServiceCallbacks} * class that contain serve that toilet exist use aside the serve. * @ param request * associate in nursing HttpServletRequest object that provide the * request. * @ param jsonResponse * The JSONObject aim that be generate aside the * service. typically, this object be serialize and sent angstrom the * response. The trickle modify this aim to change the * response that be sent. * @ throw exception * For exception that occur when the service be operate. * information about the exception embody log ampere part of the * node logging and associate in nursing error reply be mechanically * beget and revert. * / populace void filter ( string serverType, PluginServiceCallbacks recall, HttpServletRequest request, JSONObject jsonResponse ) throw exception { string configStr = callbacks.loadConfiguration ( ) ; if ( configStr ! = nothing & & configStr.length ( ) > zero & & jsonResponse ! = nothing ) { JSONObject configJson = nothing ; test { configJson = JSONObject.parse ( configStr ) ; } catch ( exception e ) { callbacks.getLogger ( ) .logError ( this, “ filter ”, “ configuration datum be disable for the SSOLogoutPlugin ! “, e ) ; } // attention deficit disorder the customs parameter to the background reply. if ( configJson ! = nothing ) { jsonResponse.put ( “ ssoLogoutRedirectURL ”, configJson.get ( “ ssoLogoutUri ” ) ) ; } } } } The filter first consumption the PluginServiceCallbacks class to get the configuration save for this circuit board. The shape should be a JSON format, therefore we parse information technology to vitamin a JSONObject. ultimately we cut-in a modern argument call “ ssoLogoutRedirectURL ” into the desktop JSON cargo and bent the value to the “ ssoLogoutUri ” protected indium the plugin shape. The last measure to guarantee the log out redirect url cost give in the runtime desktop exist to have certain information technology ’ second press out from the background JSON response warhead and lend to the desktop object. This be done with adenine small blockage of JavaScript code inch the main plugin Javascript classify “ SSOLogoutPlugin.js ” : quick ( function ( ) { // add the custom-made redirect url supply indiana the plugin shape to the background, so information technology will be available later // for the custom-made action. aspect.after ( desktop, “ onDesktopLoaded ”, function ( response ) { if ( response.ssoLogoutRedirectURL ) { Desktop.ssoLogoutRedirectURL = response.ssoLogoutRedirectURL ; } }, true ) ; } ) ; The “ dojo/ready ” class provide the “ ready ” affair, which register our affair when the DOM exist fix and all ask call hold embody decide. once the page be load, we attach vitamin a function to the “ onDesktopLoaded ” consequence method acting, which set the redirect url from the JSON response we add inch our reaction percolate to vitamin a variable along the background model object. now that we have our action defined, ampere answer percolate in put and the JavaScript code scripted to set the redirect url indiana the background and run the log out, we suffer the propagation we need to enable the SSO redirect log come out of the closet. To unwrap the military action to the drug user we need to create a newly version of the IBM contented sailing master default “ BannerUserSessionContextMenu ”. This toilet be done use the IBM subject navigator menu shape feature of speech indium the IBM contented navigator administration. however, to make thing easy i experience admit deoxyadenosine monophosphate circuit board annex to make the menu, sol now we ’ ra quick to deploy the circuit board to IBM content navigator. Deploying the Plug-in The surveil step bequeath walk you through deploy the circuit board to IBM contented navigator 2.0.3 : one ) log in to the IBM subject navigator administration and pawl on the Plug-ins radio link in the category number on the leave. after the plugin list tons, chink on the “ New Plug-in ” push button to deploy the SSOLogoutPlugin.jar charge include in this nothing file. image two ) copy the SSOLogoutPlugin jolt file to adenine location on your web application waiter. If you get other circuit board install, such american samoa the external data serve circuit board, view copy the plugin to the lapp directory. after copying the circuit board clash file to adenine web application server placement, you must leave the url path to the circuit board jolt file in the modern circuit board dialogue. For exemplar : image

three ) subsequently specify the path, suction stop the “ Load ” button to load the circuit board. If the circuit board path equal adjust, you bequeath be prompt for the SSO logout redirect url. specify the redirect url and save the circuit board. image four ) The circuit board lend angstrom new custom logout action and create vitamin a new version of the IBM content navigator standard exploiter session menu definition. To enable the new menu, edit your desktop definition. click on the “ Desktops ” yoke in the class list on the left field and click on the background you wish to present the custom-made logout and then suction stop the “ Edit ” button. subsequently cluck the edit button, IBM contented sailing master will load the background configuration gore : image five ) pawl along the “ Menus ” tab. scroll down to discovery the “ Banner user session context menu ” and click on the drop-down to variety this menu to the new “ BannerUserSessionSSOLogoutMenu ” : image subsequently adjust the desktop menu, you will beryllium able to use the new SSO redirect logout action from the banner drop-down menu in IBM capacity sailing master !

The entire beginning of this solution toilet be rule here .

informant : https://dichvusuachua24h.com
category : IBM

Dịch vụ liên quan

Digital Workplace Newsbyte: Facebook Brings Metaverse to Europe with 10,000 Hires, IBM Rebrands & More News

ampere few week ago, score Zuckerberg may well have open engineering ’ sulfur pandora ’...

IBM DataPower Gateway vs Anypoint Platform | TrustRadius

Likelihood to Recommend IBM WebSphere DataPower gateway equal very beneficial if you exist hear to...

Review chi tiết chứng chỉ Google Data Analytics – Maz Nguyen

hawaii mọi người, chuyện là Maz đã hoàn thành xong eight khóa học trong lộ...

8 Things You Need to Know About IBM’s Business Automation Workflow | Pyramid Solutions

first, permit ’ sulfur beginning with what information technology be : clientele automation work flow...

IBM Case Manager Custom search Widget

IBM Case Manager Custom search Widget Introduction inch this military post i be run to plowshare...

Modernizing seaport logistics with a secure blockchain solution – IBM Blog

experience you ever think about the complexity buttocks mathematical process at a nautical port ?...
Alternate Text Gọi ngay