How to make the Access Gate SDK work with Web Gate

When we want control the display of one area in one page, we can define this area as one resource then control the access of it. But when the user has been authenticated in the application, how can we get the user session and then call Access Gate SDK to check if the user is authorized? The following is one utility class to archive it.
* $Id: CreateUserAction.java,v 1.1 2005/10/11 23:19:34 jason Exp $
* $Revision: 1.1 $
* $Date: 2005/10/11 23:19:34 $
* Copyright (C) 1972 - 2005, Oracle Co. All Rights Reserved
* The program(s) herein may be used and/or copied only with
* the written permission of Oracle Co. or in accordance with
* the terms and conditions stipulated in the agreement/contract
* under which the program(s) have been supplied.
package oblix.view;
import com.oblix.access.ObAccessException;
import com.oblix.access.ObConfig;
import com.oblix.access.ObResourceRequest;
import com.oblix.access.ObUserSession;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
* @author zhoujian
public class OblixUtil {
private static String ObSSOCookie = "ObSSOCookie";
private OblixUtil() {
* Check if the user is Authorized
* @param request
* @param rescourceUrl
* @return
public static boolean isAuthorized(HttpServletRequest request,
String rescourceUrl) {
return isAuthorized(request, "http", rescourceUrl, "GET");
* Check if the user is Authorized
* @param request
* @param resourceType
* @param rescourceUrl
* @param resourceMethod
* @return
private static boolean isAuthorized(HttpServletRequest request,
String resourceType, String rescourceUrl, String resourceMethod) {
try {
ObConfig.initialize();
ObResourceRequest resource = new ObResourceRequest(resourceType,
rescourceUrl, resourceMethod);
ObUserSession session = getObUserSession(request);
return session.isAuthorized(resource);
} catch (ObAccessException oe) {
oe.printStackTrace();
ObConfig.shutdown();
return false;
* Get the Oblix user session from the request.
* @param request
* @return
* @throws ObAccessException
private static ObUserSession getObUserSession(HttpServletRequest request)
throws ObAccessException {
String token = getCookieValueByName(request.getCookies(), ObSSOCookie);
if (token != null) {
return new ObUserSession(token);
return null;
private static String getCookieValueByName(Cookie[] cookies, String name) {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equalsIgnoreCase(name)) {
return cookies[i].getValue();
return null;
}

Couple of options. You seem have to taken the Access Gate based approach. I will throw this in any way and you can make a call which one you want to use.
If its a web application you can control authorization based on Resource by defining policy in the Access Manager.
You mentioned aout display of one area in one page. That should be driven off of User attribute or custom logic. If it is driven off of User attribute then you can return header variable and you can check in the code as opposed to writing custom access gate.
Now if you do want to write custom access gate when the resource is already protected by a Web gate,
you can get the ObSSOCookie from the users browser session.
You can pass the URL to the IsAuthorized method and call.
Now here you have to install the Access Server SDK on the server, create custom access gate and then write the code and deploy it on that server.
THanks
Ram

Similar Messages

  • Has anyone figured out how to make the Yamaha 01V96i mixer work with Logic 9.1.8

    Has anyone figured out how to make the Yamaha 01V96i mixer work with Logic 9.1.8 as a control surface ?

    In YAMAHA01v96i:
    Go to DIO/SETUP select Generic DAW. Go to MIDI settings page and set the desired port (personally I use Number 1), Select the same audio frequency you use in your DAW (I use 44.1KhZ)...at this point You should save a scene in you 01V96i to avoid to repeat all the procedure again.
    Open studio manager, go to patch and set the input port from 17 to 32 respectively to USB1-USB16 (this will give you the return from you DAW to the 01v96i
    Save again the scene overwriting the old one.
    in LOGIC
    Click on preferences, select Audio then select 01v96i, then click on control surface and select Mackie design Baby HUI and in the midi session set the same port that you've been setting on the Yamaha 01V96i (Port 1 if you follow this example).
    That's more or less it.
    It worked for me...so far

  • How to Make the Win7 Enterprise ISO work with Boot Camp?

    Hey...
    So I've acquired a new MBA. I didn't really want to considering all the issues out there (of which so far the volume fluctuation issues applies to me as well), but on Friday I need to bring some kind of laptop with me on a trip to record a song for a wedding next month. And for that, to make it worse, I need Winblows.
    So I got the Windows 7 Enterprise evaluation ISO. I let Boot Camp modify it and write it to a USB stick.
    But when I boot into the thing, I never get to actually install Windows, because I get "Install Windows": "Windows Setup encountered an internal error while loading or searching for an unattend answer file."
    What to do??!?!!

    Hmmm... That's strange!
    Seems there are some differences between DVDs for Windows 7 that the Apple tool doesn't know how to handle?
    The image I used to install with was the "7600.16385.090713-1255_x64fre_client_en-us_OEM_Ultimate-GRMCULXFREO_EN_DVD.iso " one — I believe I downloaded this from Microsoft at some point when they had it up for developer trials or something?
    The MD5 sum of that image is dad9f7a0b4d5d928a6a67ba6cd896350. You can check yours in Terminal by writing "md5 <path to your image file>".
    Perhaps if yours is different, you can find that other image online somewhere.
    HTH

  • Anybody know how to make the upgrade kit remote work with Vi

    I have a X-Fi extreme music & an upgrade kit.{ remote & receiver} The remote will allow me to select music tracks under the the entertainment center, but will not control the volume. I can push +-or - volume all day long, but it always says 00% and dosn't change in intensity. Any Ideas?

    Hi
    I take it you have used the youp-pax software? If not, then do so. Install revision 2. I did this and my remote is fully working once more.
    Must admit I am a little annoyed creative did not provide a link to youp-pax for people wanting to update their drivers. They could have said it was use at your own risk etc, but instead I had to waste two weeks fiddling with vista until I discovered it.
    /rant off

  • How to make the rating/flagging feature work with impromptu slideshow?

    I have LR 5.2 and when I review newly imported images with an impromptu slideshow to rate and flag the image in the slideshow, the relevant "flag as pick" or "set as rejected" notification shows on the screen but at the end of the slideshow only the first image is picked or rejected and the rest remain unchanged.
    I have tried the fix that adobe published for 5.0 - changing the ui.dll but that fix prevents LR5.2 from loading alltogether.
    Any suggestions please?

    FurryHerbington wrote:
    I have tried the fix that adobe published for 5.0 - changing the ui.dll but that fix prevents LR5.2 from loading alltogether.
    the ui.dll is for 5.0 only, not compatible with 5.2, and since the fix was incorporated in 5.2, ui.dll is no longer needed.
    Unfortunately, I can't help with the pick flags - they sorta work on my copy, but slideshow has been so problematic for me for so long that I just don't use it. In the tests I just did for you to check the pick flags - first test: the pick flags did not work correctly (behavior as you stated), the rest of the tests the pick flags worked properly, but something else didn't. e.g. which monitor was used changed between tests, and the manual slideshow became automatic at full speed. In all tests the color/tone are off.
    Lr's impromptu slideshow is useless for me - made worse over time, not better.
    Sorry I've not been more help, but that's all I got...
    PS - I use ShowBiz for in-Lr slideshows - has not all the bells/whistles, but at least it works, and it's full-screen (in Lr5) too, which I like.
    Cheers,
    Rob

  • How to make the same code that works only?

    how to make the same code that works only?
    code:
    Form2.Close = Me.Enabled = true
    effect such as this code

    I have this code:
    Public Class Form1
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    Form2.Show()
    Me.Enabled = False
    End Sub
    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    Form3.Show()
    Me.Enabled = False
    End Sub
    End Class
    he wants to after closing Form2 and Form3 unblocked the whole form1
    it means that:
    when I click the button, displays the himself form2 and blocks himself form1" and after closing Form2 , unlocks himself Form1"
    the same with Form3

  • Hi I cannot make the accessibility zoom option work. What are the commands on a non Mac keyboard?

    Hi I cannot make the accessibility zoom option work. What are the commands on a non Mac keyboard?

    If you want to convert SWF to DVD in freeway, find a converter to convert SWF to normal video such as: SUPER, then burn to DVD.

  • How well does the iPhone 5s/5c work with Wind Mobile?

    I'm going to be (hopefully) getting the iphone 5s or 5c soon and I'm trying to decide on which carrier to go with. How well does the iphone 5s/5c work with wind mobile and how fast is the internet with data?

    http://www.windmobile.ca/
    iPhone: Wireless carrier support and features

  • How to handle the table control While working with LSMW?

    How to handle the table control While working with LSMW?

    its possible in lsmw,
    Hi,
    LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
    check that single charecter field, it that is X that means the header record is processed, and do the items.
    and, this is another way, try this out also
    YOu can do this in "Define Source Structures" step,
    the HEADER is defined first,
    then the DETAIL below the HEADER.
    add the fields to the structures.
    Both should have some common key field
    Please take care that the name of the common field is the same.
    Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
    Thanks

  • How to make the Access Gate work

    have been following the developers guide to write an access gate. my application(simple html) is running on JBoss, want to protect this resouce using the access gate. JAccessGate.java is working fine however the access gate is not intercepting the resource request.
    how do i configure Jboss with the Access Server so that the Access Gate process the request.
    the servlet example isn't working ... constants.REQUEST isn't being recognised despite adding all the pkg's.
    it would be helpful if someone could share the steps to achieve this.
    that apart any idea about how the reverse proxy works ?
    thanks and regards
    Edited by: user642640 on Jun 6, 2009 4:14 AM

    Couple of options. You seem have to taken the Access Gate based approach. I will throw this in any way and you can make a call which one you want to use.
    If its a web application you can control authorization based on Resource by defining policy in the Access Manager.
    You mentioned aout display of one area in one page. That should be driven off of User attribute or custom logic. If it is driven off of User attribute then you can return header variable and you can check in the code as opposed to writing custom access gate.
    Now if you do want to write custom access gate when the resource is already protected by a Web gate,
    you can get the ObSSOCookie from the users browser session.
    You can pass the URL to the IsAuthorized method and call.
    Now here you have to install the Access Server SDK on the server, create custom access gate and then write the code and deploy it on that server.
    THanks
    Ram

  • How to make the active save-to-file with the data from GPIB ?

    Hello,,everybody !!
    I want to make the active save-to-file with the data from GPIB since starting the measurement. To save-to-file at the end of measurment is somehow risky for losing the data because my measurment have to take for long time (eg. 24-48 hours).
    Thank you in advance for anybody's help !!

    Thanks Dennis,
    I have already append, I got it but still have one small problem that between each line it has the blank line. Example as below ,
    16:40:33 54.24
    16:40:34 54.23
    16:40:35 54.24
    I want to get rid of the blank line in between.. Do you have the idea about it ?

  • How to make the print, email button work in PDF output

    Hello,
    I'm using LC  Designer ES2 to create a xdp form with print, email and httpSubmit  button. Then using LC server to generatePDF output, binding with xml  dynamically. But after that I got the static pdf file and none of the  button work,
    I really need help on how to make it work. Any configuration, plug-in....
    Thanks,

    Hi,
    This is solved by note 1281208.
    Thanks,
    Edited by: Zhijie Kong on May 24, 2011 6:06 PM

  • How to make the Printer deskjet 3940 compatible with Windows 7, home basic, 32 bits?

    I have HP Deskjet 3940 Printer. I recently purchased a Lenovo desktop( C320, 57-302429) which has Windows 7,home basic,32 bits operating system. The said printer does not work with the above computer. Please guide how to make this printer compatible with the above operating system.
    This question was solved.
    View Solution.

    1. Click the Start button, click Control Panel and double click Devices and Printers.
    2. Click Add a Printer.
    3. Select Add a local printer.
    4. Choose an existing USBx Local port, click Next.
    5. Click the Windows Update button.
    6. After the update finishes, search for the 3940 driver.
    7. click Next,Next,Next,Next,Finish
    Please mark the post that solves your issue as "Accept as Solution".
    If my answer was helpful click the “Thumbs Up" on the left to say “Thanks”!
    I am not a HP employee.

  • Does the collaboration builder sdk work with as3

    Hi.  I want to make a custom pod for connect and I have flashbuilder.
    Can I use AS3 or must I use AS2?
    And do you know any good additional sources and or tutorial on doing this or on building custom pods?
    Thanks!

    The Connect Meeting application has been in AS3 since Connect 8. AS3 and AS2 don't play well together, so, no, you shouldn't use AS2.
    This tutorial may be of use: http://www.connectusers.com/tutorials/2011/06/building_custom_pods/. It is for Connect 8, but it should still apply. Here is part two of that tutorial: http://youtu.be/BCoNW9SYIdc.
    You can get the Collaboration Builder SDK document from the developer center: http://www.adobe.com/devnet/adobeconnect.html

  • How to make the JMX custom authentication work ?

    I am using the password and access file based authentication on JMX. When building my JMXConnectorServer, i use the property names and it works fine.
        Map<String, String> env = new HashMap<String, String>();
        env.put(ApplicationProperties.JMX_PWD_FILE_PROP, pwdFile);
        env.put(ApplicationProperties.JMX_ACCESS_FILE_PROP, accFile);
        connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(jmxServiceURL, env, mBeanServer);However, now i want to use a custom authenticator and i implemented my own LoginModule to have a encrypted password in the password file. Thus the ideas is to have an encrypted password and plain text user name in the password file.
        public class ABCDJMXLoginModule implements LoginModule {
            private CallbackHandler callbackHandler;
            private Subject subject;
            private String u_username;
            private String u_password;
            private JMXPrincipal user;
            private Properties userCredentials;
            private String passwordFile;
            private String f_username;
            private String f_password;
            private static final Logger logger = LoggerFactory.getLogger(ABCDJMXLoginModule.class);
            public boolean abort() throws LoginException {
                // TODO Auto-generated method stub
                return false;
            public boolean commit() throws LoginException {
                // TODO Auto-generated method stub
                return true;
            public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState,
                    Map<String, ?> options) {
                this.subject = subject;
                this.callbackHandler = callbackHandler;
            public boolean login() throws LoginException {
                try {
                    attemptLogin();
                    loadPasswordFile();
                } catch (Exception e) {
                    logger.info("Exception, e");
                if (u_username == null || u_password == null) {
                    throw new LoginException("Either no username or no password specified");
                logger.info("Password from user and file : " + u_password + " :: " + f_password);
                if (u_password.equals(f_password)) {
                    return true;
                return false;
            public boolean logout() throws LoginException {
                // TODO Auto-generated method stub
                return true;
            private void attemptLogin() throws LoginException {
                Callback[] callbacks = new Callback[2];
                callbacks[0] = new NameCallback("u_username");
                callbacks[1] = new PasswordCallback("u_password", false);
                try {
                    callbackHandler.handle(callbacks);
                } catch (IOException e) {
                    logger.error("IOException", e);
                } catch (UnsupportedCallbackException e) {
                    logger.error("UnsupportedCallbackException", e);
                u_username = ((NameCallback) callbacks[0]).getName();
                user = new JMXPrincipal(u_username);
                char[] tmpPassword = ((PasswordCallback) callbacks[1]).getPassword();
                u_password = tmpPassword.toString();
                logger.info("UserName : " + u_username);
                logger.info("Password : " + u_password);
                System.arraycopy(tmpPassword, 0, u_password, 0, tmpPassword.length);
                ((PasswordCallback) callbacks[1]).clearPassword();
            private void loadPasswordFile() throws IOException {
                FileInputStream fis = null;
                passwordFile = "c:\\abcd.jmx.enc.password.file";
                try {
                    fis = new FileInputStream(passwordFile);
                } catch (SecurityException e) {
                    logger.error("Security Exception", e);
                BufferedInputStream bis = new BufferedInputStream(fis);
                userCredentials = new Properties();
                userCredentials.load(bis);
                bis.close();
                f_username = u_username;
                f_password = (String) userCredentials.get(f_username);
                logger.info("UserName before Decrypt : " + f_username);
                logger.info("Password from file before Decrypt : " + f_password);
                // decrypt the password from file and later compare it with user password from JConsole
                if (f_password != null) f_password = Cryptography.decrypt(f_password);
                logger.info("Password from file after Decrypt : " + f_password);
        }When i use the following code and try to connect via JConsole nothing happens.
        Map<String, String> env = new HashMap<String, String>();
        env.put(ApplicationProperties.JMX_PWD_FILE_PROP, pwdFile);
        env.put(ApplicationProperties.JMX_ACCESS_FILE_PROP, accFile);
        env.put("jmx.remote.x.login.config", "com.splwg.ejb.service.management.ABCDJMXLoginModule");
        connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(jmxServiceURL, env, mBeanServer);Any ideas on why this happens ? For sure, i am also not coming into the ABCDJMXLoginModule class - I have some print statements there and none of them get printed. Any sort of ideas and solutions are appreciated. I tried with the property "com.sun.management.jmxremote.login.config" too. I was expecting that mentioning the property in the environment and passing it to the JMXCOnnectorServer would do all the trick.
    Am i missing something ?

    Hello dcloko_BR,
    I downloaded and installed Lenovo´s The Lenovo Solution Center and now the solution center starts after pressing the blue button. Perhaps give it a try.
    Edit: Upps sorry, only newer models are supported according to the readme.txt.
    Best regards
    Andreas
    Follow @LenovoForums on Twitter! Try the forum search, before first posting: Forum Search Option
    Please insert your type, model (not S/N) number and used OS in your posts.
    I´m a volunteer here using New X1 Carbon, ThinkPad Yoga, Yoga 11s, Yoga 13, T430s,T510, X220t, IdeaCentre B540.
    TIP: If your computer runs satisfactorily now, it may not be necessary to update the system.
     English Community       Deutsche Community       Comunidad en Español

Maybe you are looking for