Package org.omg.GSSUP

Examples of org.omg.GSSUP.InitialContextToken


            if (message.client_authentication_token != null
                && message.client_authentication_token.length > 0)
            {
               if (traceEnabled)
                  log.trace("received client authentication token");
               InitialContextToken authToken =
                  CSIv2Util.decodeInitialContextToken(
                                          message.client_authentication_token,
                                          codec);
               if (authToken == null)
               {
View Full Code Here


        // Extract client authentication token
        if (support_gssup_authorization
            && establishMsg.identity_token.discriminator() == ITTAbsent.value
            && establishMsg.client_authentication_token.length > 0)
        {
            InitialContextToken gssupToken = decodeGSSUPToken(establishMsg.client_authentication_token);

            String useratrealm = utf8decode(gssupToken.username);

            String name;
            String realm;
View Full Code Here

            }

        } else {

            // Make GSSUP InitialContextToken
            InitialContextToken gssupToken = new InitialContextToken();
            gssupToken.username = utf8encode(scopedUserName);
            gssupToken.target_name = encodeGSSExportedName(realm);
            gssupToken.password = utf8encode(password);

            establishMsg.client_authentication_token = encodeGSSUPToken(gssupToken);
View Full Code Here

/*     */           {
/* 166 */             String tmp = credential.toString();
/* 167 */             password = tmp.getBytes("UTF-8");
/*     */           }
/*     */
/* 171 */           InitialContextToken authenticationToken = new InitialContextToken(username, password, encodedTargetName);
/*     */
/* 176 */           byte[] encodedAuthenticationToken = CSIv2Util.encodeInitialContextToken(authenticationToken, this.codec);
/*     */
/* 181 */           EstablishContext message = new EstablishContext(0L, noAuthorizationToken, absentIdentityToken, encodedAuthenticationToken);
/*     */
View Full Code Here

/*     */
/* 388 */         if ((message.client_authentication_token != null) && (message.client_authentication_token.length > 0))
/*     */         {
/* 391 */           if (traceEnabled)
/* 392 */             log.trace("received client authentication token");
/* 393 */           InitialContextToken authToken = CSIv2Util.decodeInitialContextToken(message.client_authentication_token, this.codec);
/*     */
/* 397 */           if (authToken == null)
/*     */           {
/* 399 */             threadLocal.sasReply = createMsgCtxError(message.client_context_id, 2);
/*     */
View Full Code Here

/*     */     catch (Exception e)
/*     */     {
/* 748 */       return null;
/*     */     }
/*     */
/* 751 */     InitialContextToken contextToken = InitialContextTokenHelper.extract(any);
/*     */
/* 754 */     return contextToken;
/*     */   }
View Full Code Here

/*     */         }
/* 232 */         byte[] username = name.getBytes("UTF-8");
/*     */
/* 235 */         byte[] password = "j2ee".getBytes("UTF-8");
/*     */
/* 238 */         InitialContextToken authenticationToken = new InitialContextToken(username, password, encodedTargetName);
/*     */
/* 243 */         encodedAuthenticationToken = CSIv2Util.encodeInitialContextToken(authenticationToken, this.codec);
/*     */       }
/*     */
/* 247 */       if ((identityToken != absentIdentityToken) || (encodedAuthenticationToken != noAuthenticationToken))
View Full Code Here

            // write the GSS ASN tag
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            baos.write(ASN_TAG_GSS);

            // create and encode a GSSUP initial context token
            InitialContextToken init_token = new InitialContextToken();
            init_token.username = user.getBytes("UTF-8");

            init_token.password = pwd.getBytes("UTF-8");

            init_token.target_name = encodeGSSExportName(GSSUPMechOID.value.substring(4), target);
View Full Code Here

                            int len = token_len - oid_len;
                            byte[] init_tok_arr = new byte[len];
                            bais.read(init_tok_arr, 0, len);
                            Any a = codec.decode_value(init_tok_arr,
                                    InitialContextTokenHelper.type());
                            InitialContextToken token = InitialContextTokenHelper.extract(a);
                            if (token != null) {
                                gssup_tok.username = token.username;
                                gssup_tok.password = token.password;
                                gssup_tok.target_name = decodeGSSExportName(token.target_name).getBytes("UTF-8");
View Full Code Here

    public void initTarget() {
    }

    public static byte[] encode(ORB orb, Codec codec, String username, String password, byte[] target_name)
    {
        InitialContextToken subject = null;
        try
        {
            subject = new InitialContextToken( username.getBytes("UTF-8"),
                                               password.getBytes("UTF-8"),
                                               target_name);
        }
        catch(java.io.UnsupportedEncodingException e)
        {
View Full Code Here

TOP

Related Classes of org.omg.GSSUP.InitialContextToken

Copyright © 2018 www.massapicom. 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.