@ Function public static byte [ ] getClientToken ( GSSContext context ) { byte [ ] initialToken = new byte [ 0 ] ; if ( ! context . isEstablished ( ) ) { try { // token is ignored on the first call initialToken = context . initSecContext ( initialToken , 0 , initialToken . length ) ; return getTokenWithLengthPrefix ( initialToken ) ; } catch ( GSSException ex ) { throw new RuntimeException ( "Exception getting client token" , ex ) ; } } return null ; }
Create a token from a clients point of view for establishing a secure communication channel . This is a client side token so it needs to bootstrap the token creation .