Examples of KeyIdentifier


Examples of com.smartgwt.client.core.KeyIdentifier

        return token;
    }

    private void registerPageKeys() {
        if (isDebugMode()) {
            KeyIdentifier debugKey = new KeyIdentifier();
            debugKey.setCtrlKey(true);
            debugKey.setKeyName("D");
            Page.registerKey(debugKey, new KeyCallback() {
                public void execute(String keyName) {
                    SC.showConsole();
                }
            });
        }

        // Control-Shift-S for aggregate rpc service stats
        KeyIdentifier statisticsWindowKey = new KeyIdentifier();
        statisticsWindowKey.setCtrlKey(true);
        statisticsWindowKey.setShiftKey(true);
        statisticsWindowKey.setAltKey(false);
        statisticsWindowKey.setKeyName("S");
        Page.registerKey(statisticsWindowKey, new KeyCallback() {
            public void execute(String keyName) {
                TestRemoteServiceStatisticsView.showInWindow();
            }
        });

        // Control-Alt-S for response stats
        KeyIdentifier responseStatsWindowKey = new KeyIdentifier();
        responseStatsWindowKey.setCtrlKey(true);
        statisticsWindowKey.setShiftKey(false);
        responseStatsWindowKey.setAltKey(true);
        responseStatsWindowKey.setKeyName("s");
        Page.registerKey(responseStatsWindowKey, new KeyCallback() {
            public void execute(String keyName) {
                TestDataSourceResponseStatisticsView.showInWindow();
            }
        });

        KeyIdentifier messageCenterWindowKey = new KeyIdentifier();
        messageCenterWindowKey.setCtrlKey(true);
        messageCenterWindowKey.setKeyName("M");
        Page.registerKey(messageCenterWindowKey, new KeyCallback() {
            public void execute(String keyName) {
                menuBarView.getMessageCenter().showMessageCenterWindow();
            }
        });

        KeyIdentifier testTopViewKey = new KeyIdentifier();
        testTopViewKey.setCtrlKey(true);
        testTopViewKey.setAltKey(true);
        testTopViewKey.setKeyName("t");
        Page.registerKey(testTopViewKey, new KeyCallback() {
            public void execute(String keyName) {
                goToView("Test");
            }
        });
View Full Code Here

Examples of com.smartgwt.client.core.KeyIdentifier

        view.getLogger().log(Level.SEVERE, "Exception caught", e)
        view.getErrorHelper().onError(unwrapped);
      }
    });
    if (!GWT.isScript()) {
        KeyIdentifier debugKey = new KeyIdentifier();
        debugKey.setCtrlKey(true);
        debugKey.setKeyName("D");
        Page.registerKey(debugKey, new KeyCallback() {
            public void execute(String keyName) {
                SC.showConsole();
            }
        });
View Full Code Here

Examples of com.smartgwt.client.core.KeyIdentifier

        };

        MenuItem closeItem = new MenuItem("<u>C</u>lose");
        closeItem.setEnableIfCondition(enableCondition);
        closeItem.setKeyTitle("Alt+C");
        KeyIdentifier closeKey = new KeyIdentifier();
        closeKey.setAltKey(true);
        closeKey.setKeyName("C");
        closeItem.setKeys(closeKey);
        closeItem.addClickHandler(new ClickHandler() {
            public void onClick(MenuItemClickEvent event) {
                int selectedTab = mainTabSet.getSelectedTabNumber();
                mainTabSet.removeTab(selectedTab);
View Full Code Here

Examples of com.sun.xml.ws.security.opt.api.reference.KeyIdentifier

            //HashMap tokenCache = wssContext.getTokenCache();
            //HashMap insertedX509Cache = wssContext.getInsertedX509Cache();

            Key returnKey = null;
            if (reference instanceof KeyIdentifier) {
                KeyIdentifier keyId = (KeyIdentifier) reference;

                returnKey = resolveKeyIdentifier(context, keyId.getValueType(),
                        keyId.getReferenceValue(), null, purpose);


            } else if (reference instanceof DirectReference) {
                //WSSElementFactory elementFactory = new WSSElementFactory(wssContext.getSOAPVersion());
                //DirectReference directRef = elementFactory.createDirectReference();
View Full Code Here

Examples of com.sun.xml.ws.security.opt.api.reference.KeyIdentifier

            //HashMap tokenCache = wssContext.getTokenCache();
            //HashMap insertedX509Cache = wssContext.getInsertedX509Cache();

            Key returnKey = null;
            if (reference instanceof KeyIdentifier) {
                KeyIdentifier keyId = (KeyIdentifier) reference;

                returnKey = resolveKeyIdentifier(context, keyId.getValueType(),
                        keyId.getReferenceValue(), null, purpose);


            } else if (reference instanceof DirectReference) {
                //WSSElementFactory elementFactory = new WSSElementFactory(wssContext.getSOAPVersion());
                //DirectReference directRef = elementFactory.createDirectReference();
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.reference.KeyIdentifier

    public DirectReference createDirectReference(){
        return new DirectReference(soapVersion);
    }
   
    public KeyIdentifier createKeyIdentifier(){
        return new KeyIdentifier(soapVersion);
    }
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.reference.KeyIdentifier

        assertionId = she.getId();
       
        //todo reference different keyreference types.
        SecurityTokenReference samlSTR;
        if(authorityBinding == null){
            KeyIdentifier keyIdentifier = new KeyIdentifier(context.getSOAPVersion());
            keyIdentifier.setValue(assertionId);
            if(MessageConstants.SAML_v2_0_NS.equals(she.getNamespaceURI())){
                keyIdentifier.setValueType(MessageConstants.WSSE_SAML_v2_0_KEY_IDENTIFIER_VALUE_TYPE);
            } else{
                keyIdentifier.setValueType(MessageConstants.WSSE_SAML_KEY_IDENTIFIER_VALUE_TYPE);
            }
            samlSTR = elementFactory.createSecurityTokenReference(keyIdentifier);
            if (idVal != null) {
                samlSTR.setTokenType(MessageConstants.WSSE_SAML_v2_0_TOKEN_TYPE);
            }else{
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.reference.KeyIdentifier

        return keyInfo;
    }
   
    private EncryptedKey encryptKey(final Key key, final X509Certificate cert) throws XWSSecurityException{
        KeyInfo keyInfo = null;
        final KeyIdentifier keyIdentifier = wef.createKeyIdentifier();
        keyIdentifier.setValueType(MessageConstants.X509SubjectKeyIdentifier_NS);
        keyIdentifier.updateReferenceValue(cert);
        keyIdentifier.setEncodingType(MessageConstants.BASE64_ENCODING_NS);
        final SecurityTokenReference str = wef.createSecurityTokenReference(keyIdentifier);
        keyInfo = wef.createKeyInfo((com.sun.xml.ws.security.opt.impl.keyinfo.SecurityTokenReference) str);
       
        return wef.createEncryptedKey(null,MessageConstants.RSA_OAEP_KEY_TRANSPORT,keyInfo,cert.getPublicKey(),key);
    }
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.reference.KeyIdentifier

     * @param refType String
     * @return KeyIdentifier
     * @throws com.sun.xml.wss.XWSSecurityException
     */
    protected KeyIdentifier buildKeyInfoWithKI(AuthenticationTokenPolicy.X509CertificateBinding binding, String refType) throws XWSSecurityException {
        KeyIdentifier keyIdentifier = elementFactory.createKeyIdentifier();
        //keyIdentifier.setValue(binding.getCertificateIdentifier());
        keyIdentifier.setValueType(refType);
        keyIdentifier.updateReferenceValue(binding.getX509Certificate());
        keyIdentifier.setEncodingType(MessageConstants.BASE64_ENCODING_NS);
        if (keyIdentifier.getValue() == null || keyIdentifier.getValue().length() == 0) {
            logger.log(Level.SEVERE, LogStringsMessages.WSS_1852_KEY_IDENTIFIER_EMPTY());
            throw new XWSSecurityException(LogStringsMessages.WSS_1852_KEY_IDENTIFIER_EMPTY());
        }
        buildKeyInfo(keyIdentifier, binding.getSTRID());
        return keyIdentifier;
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.reference.KeyIdentifier

     * @param refType String
     * @return KeyIdentifier
     * @throws com.sun.xml.wss.XWSSecurityException
     */
    protected KeyIdentifier buildKeyInfoWithKIKerberos(AuthenticationTokenPolicy.KerberosTokenBinding binding, String refType) throws XWSSecurityException {
        KeyIdentifier keyIdentifier = elementFactory.createKeyIdentifier();
        keyIdentifier.setValueType(refType);
        keyIdentifier.updateReferenceValue(binding.getTokenValue());
        keyIdentifier.setEncodingType(MessageConstants.BASE64_ENCODING_NS);
        if (keyIdentifier.getValue() == null || keyIdentifier.getValue().length() == 0) {
            logger.log(Level.SEVERE, LogStringsMessages.WSS_1852_KEY_IDENTIFIER_EMPTY());
            throw new XWSSecurityException(LogStringsMessages.WSS_1852_KEY_IDENTIFIER_EMPTY());
        }
        buildKeyInfo(keyIdentifier, binding.getSTRID());
        return keyIdentifier;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.