Examples of Token


Examples of com.sun.xml.ws.security.Token

            IssuedTokenManager manager = IssuedTokenManager.getInstance();
          
            String appliesTo = "http://localhost:8080/jaxws-fs/simple";
            IssuedTokenContext ctx = manager.createIssuedTokenContext(config, appliesTo);
            manager.getIssuedToken(ctx);
            Token issuedToken = ctx.getSecurityToken();
          
            return (Element)issuedToken.getTokenValue();
        }catch(Exception ex){
            throw new RuntimeException(ex);
        }
    }
View Full Code Here

Examples of com.sun.xml.ws.security.opt.api.keyinfo.Token

        if (logger.isLoggable(Level.FINEST)) {
            logger.log(Level.FINEST, "X509 Token id: " + id);
        }

        Token token = (Token) securityHeader.getChildElement(id);
        if (token != null) {
            if (token instanceof BinarySecurityToken) {
                return (BinarySecurityToken) token;
            }
            logger.log(Level.SEVERE, LogStringsMessages.WSS_1854_TWO_TOKENS_WITH_SAME_ID());
View Full Code Here

Examples of com.sun.xml.ws.security.policy.Token

        if(st.getSignedElements().hasNext() || st.getSignedParts().hasNext()){
            buildSP = true;
        }

        while(tokens.hasNext()){
            Token token = (Token) tokens.next();
            SecurityPolicyVersion spVersion = SecurityPolicyUtil.getSPVersion((PolicyAssertion)token);
            WSSPolicy policy = tokenProcessor.getWSSToken(token);
            if (this instanceof EndorsingSupportingTokensProcessor) {
                if (PolicyUtil.isUsernameToken((PolicyAssertion)token,spVersion)) {
                    AuthenticationTokenPolicy.UsernameTokenBinding utb =
                            (AuthenticationTokenPolicy.UsernameTokenBinding) policy;
                    utb.isEndorsing(true);                   
                }
            }
            if(PolicyUtil.isIssuedToken((PolicyAssertion) token, spVersion) &&
                    this instanceof EndorsingSupportingTokensProcessor){
                ((IssuedTokenKeyBinding)policy).setSTRID(null);
            }
            if ( policy.getUUID() != null ) {

                addToPrimarySignature(policy,token);

                encryptToken(token, spVersion);

                if(PolicyUtil.isSamlToken((PolicyAssertion)token, spVersion)){
                    correctSAMLBinding(policy);
                }

                collectSignaturePolicies(token);
                if(buildEP){
                    EncryptionPolicy ep = new EncryptionPolicy();
                    ep.setKeyBinding(policy);
                    getEPList().add(ep);
                }
            }

           //TODO:: Add token to MessagePolicy;
            if (!(this instanceof EndorsingSupportingTokensProcessor) ||
                    (this instanceof EndorsingSupportingTokensProcessor && token instanceof X509Token && token.getIncludeToken().endsWith("Never"))) {
                AuthenticationTokenPolicy atp = new AuthenticationTokenPolicy();
                atp.setFeatureBinding(policy);
                policyContainer.insert(atp);
            }
            //TODO: Take care of targets.
View Full Code Here

Examples of com.twitterapime.xauth.Token

        String user = (String) cfg.getUser();
        String pass = (String) cfg.getPass();
        String consumerKey = "LDMQEFW35SC91fM4xtlfVw";
        String consumerSecret = "DEjgPTmyWX55j6ZPNefpTZ9ImE7QCLrdyhQslDKoY";

        Token token = new Token("173552183-p56LQ2ERm4s5XFuA9bpvB6scAC7RGD9x9gHeb9JA", "NmlPw8GoP32d7AF5RqQAvmmUqfmlM7mJBWyBK1U6DA");

        Credential c = new Credential(user, consumerKey, consumerSecret, token);
//        Credential c = new Credential(user, pass, consumerKey,consumerSecret);
        return UserAccountManager.getInstance(c);
    }
View Full Code Here

Examples of com.wcohen.ss.api.Token

    private int nextId = 0;
    private Map<String, Token> tokMap = new TreeMap<String, Token>();
   
    public Token intern(String s) {
        s = s.toLowerCase().intern();
        Token tok = tokMap.get(s);
        if (tok == null) {
            tok = new BasicToken(++nextId, s);
            tokMap.put(s, tok);
        }
        return tok;
View Full Code Here

Examples of com.woorea.openstack.keystone.v3.model.Token

   
    OpenStackResponse response = keystone.tokens().authenticate(auth).request();
   
    String tokenId = response.header("X-Subject-Token");
   
    Token token = response.getEntity(Token.class);
   
    System.out.println(tokenId);

    System.out.println(token);
View Full Code Here

Examples of compilador.analizador.sintactico.Token

   
    Pila.add(s[0]);
    Posicion.add(new Dimension(x,y));
   
    //Llenando el Token para el analizador sintactico
    vToken.add(new Token(s[0],s[1],x,y));
   
   
        for(int i=0;i<s.length;i++){
          dtm.setValueAt(s[i], iV, jV);
          if(tam<s[0].length()){
View Full Code Here

Examples of csa.util.syntax.Syntax.Lexer.Token

    dp = null;
    if (workingIt.hasNext()) {
      dp = (DocPosition) workingIt.next();
    }
    try {
      Token t;
      boolean done = false;
      dpEnd = dpStart;
      synchronized (docLock) {
        // we are playing some games with the lexer for
        // efficiency.
        // we could just create a new lexer each time here,
        // but instead,
        // we will just reset it so that it thinks it is
        // starting at the
        // beginning of the document but reporting a funny
        // start position.
        // Reseting the lexer causes the close() method on
        // the reader
        // to be called but because the close() method has
        // no effect on the
        // DocumentReader, we can do this.
        syntaxLexer.reset(documentReader, 0, dpStart
            .getPosition(), 0);
        // After the lexer has been set up, scroll the
        // reader so that it
        // is in the correct spot as well.
        documentReader.seek(dpStart.getPosition());
        // we will highlight tokens until we reach a good
        // stopping place.
        // the first obvious stopping place is the end of
        // the document.
        // the lexer will return null at the end of the
        // document and wee
        // need to stop there.
        t = syntaxLexer.getNextToken();
      }
      newPositions.add(dpStart);
      while (!done && t != null) {
        // this is the actual command that colors the stuff.
        // Color stuff with the description of the styles
        // stored in tokenStyles.
        if (t.getCharEnd() <= doc.getLength()) {
          doc.setCharacterAttributes(t.getCharBegin() + change,
              t.getCharEnd()  - t.getCharBegin(),
              TokenStyles.getStyle(t.getDescription()),
              true);
          // record the position of the last bit of
          // text that we colored
          dpEnd = new DocPosition(t.getCharEnd());
        }
        lastPosition = (t.getCharEnd() + change);
        // The other more complicated reason for doing no
        // more highlighting
        // is that all the colors are the same from here on
        // out anyway.
        // We can detect this by seeing if the place that
        // the lexer returned
        // to the initial state last time we highlighted is
        // the same as the
        // place that returned to the initial state this
        // time.
        // As long as that place is after the last changed
        // text, everything
        // from there on is fine already.
        if (t.getState() == Token.INITIAL_STATE) {
          // look at all the positions from last time that
          // are less than or
          // equal to the current position
          while (dp != null
              && dp.getPosition() <= t.getCharEnd()) {
            if (dp.getPosition() == t.getCharEnd()
                && dp.getPosition() >= endRequest
                    .getPosition()) {
              // we have found a state that is the
              // same
              done = true;
View Full Code Here

Examples of cuchaz.enigma.analysis.Token

    //tree.acceptVisitor( new TreeDumpVisitor( new File( "tree." + entry.getClassName().replace( '/', '.' ) + ".txt" ) ), null );
    String source = m_deobfuscator.getSource( tree );
    SourceIndex index = m_deobfuscator.getSourceIndex( tree, source );
   
    // get the token value
    Token token = index.getDeclarationToken( entry );
    if( token == null )
    {
      return null;
    }
    return source.substring( token.start, token.end );
View Full Code Here

Examples of de.bokelberg.flex.parser.AS3Scanner.Token

                         final Tokens tokenEntries )
   {
      try
      {
         final AS3Scanner scanner = initializeScanner( tokens );
         Token currentToken = scanner.moveToNextToken();
         int inImportLine = 0;

         while ( currentToken != null
               && currentToken.getText().compareTo( KeyWords.EOF.toString() ) != 0 )
         {
            final String currentTokenText = currentToken.getText();
            final int currentTokenLine = currentToken.getLine();

            if ( !isTokenIgnored( currentTokenText ) )
            {
               if ( isTokenIgnoringLine( currentTokenText ) )
               {
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.