Package org.apache.directory.shared.kerberos.components

Examples of org.apache.directory.shared.kerberos.components.AuthorizationData


    @Override
    protected void setIntegerValue( int value, AuthorizationDataContainer authorizationDataContainer )
    {
        AuthorizationType authType = AuthorizationType.getTypeByValue( value );

        AuthorizationData authorizationData = authorizationDataContainer.getAuthorizationData();
        authorizationData.createNewAD();
        authorizationData.setCurrentAdType( authType );

        if ( IS_DEBUG )
        {
            LOG.debug( "zdType : {}", authType );
        }
View Full Code Here


            throw new DecoderException( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );
        }

        if ( authorizationDataContainer.getAuthorizationData() == null )
        {
            AuthorizationData authData = new AuthorizationData();
            authorizationDataContainer.setAuthorizationData( authData );

            if ( IS_DEBUG )
            {
                LOG.debug( "AuthorizationData created" );
View Full Code Here

        if ( request.getKdcReqBody().getEncAuthorizationData() != null )
        {
            byte[] authorizationData = cipherTextHandler.decrypt( authenticator.getSubKey(), request.getKdcReqBody()
                .getEncAuthorizationData(), KeyUsage.TGS_REQ_KDC_REQ_BODY_AUTHZ_DATA_ENC_WITH_TGS_SESS_KEY );
            AuthorizationData authData = KerberosDecoder.decodeAuthorizationData( authorizationData );
            authData.addEntry( tgt.getEncTicketPart().getAuthorizationData().getCurrentAD() );
            newTicketPart.setAuthorizationData( authData );
        }

        processTransited( newTicketPart, tgt );
View Full Code Here

        if ( request.getKdcReqBody().getEncAuthorizationData() != null )
        {
            byte[] authorizationData = cipherTextHandler.decrypt( authenticator.getSubKey(), request.getKdcReqBody()
                .getEncAuthorizationData(), KeyUsage.TGS_REQ_KDC_REQ_BODY_AUTHZ_DATA_ENC_WITH_TGS_SESS_KEY );
            AuthorizationData authData = KerberosDecoder.decodeAuthorizationData( authorizationData );
            authData.addEntry( tgt.getEncTicketPart().getAuthorizationData().getCurrentAD() );
            newTicketPart.setAuthorizationData( authData );
        }

        processTransited( newTicketPart, tgt );
View Full Code Here

        {
            throw new KerberosException( ErrorType.KRB_AP_ERR_BAD_INTEGRITY, de );
        }

        // get the decoded AuthorizationData
        AuthorizationData authorizationData = ( ( AuthorizationDataContainer ) authorizationDataContainer ).getAuthorizationData();

        return authorizationData;
    }
View Full Code Here

        catch ( DecoderException de )
        {
            fail( de.getMessage() );
        }

        AuthorizationData authData = authDataContainer.getAuthorizationData();
       
        assertNotNull( authData.getAuthorizationData().size() );
        assertEquals( 2, authData.getAuthorizationData().size() );
       
        String[] expected = new String[]{ "abcdef", "ghi" };
        int i = 0;
       
        for ( AuthorizationDataEntry ad : authData.getAuthorizationData() )
        {
            assertEquals( AuthorizationType.AD_INTENDED_FOR_SERVER, ad.getAdType() );
            assertTrue( Arrays.equals( Strings.getBytesUtf8(expected[i++]), ad.getAdData() ) );
           
        }

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( authData.computeLength() );
       
        try
        {
            bb = authData.encode( bb );
   
            // Check the length
            assertEquals( 0x21, bb.limit() );
   
            String encodedPdu = Strings.dumpBytes(bb.array());
View Full Code Here

    @Override
    protected void setIntegerValue( int value, AuthorizationDataContainer authorizationDataContainer )
    {
        AuthorizationType authType = AuthorizationType.getTypeByValue( value );

        AuthorizationData authorizationData = authorizationDataContainer.getAuthorizationData();
        authorizationData.createNewAD();
        authorizationData.setCurrentAdType( authType );

        if ( IS_DEBUG )
        {
            LOG.debug( "zdType : {}", authType );
        }
View Full Code Here

            throw new DecoderException( I18n.err( I18n.ERR_744_NULL_PDU_LENGTH ) );
        }

        if ( authorizationDataContainer.getAuthorizationData() == null )
        {
            AuthorizationData authData = new AuthorizationData();
            authorizationDataContainer.setAuthorizationData( authData );


            if ( IS_DEBUG )
            {
View Full Code Here

        catch ( DecoderException de )
        {
            throw de;
        }

        AuthorizationData authorizationData = authorizationDataContainer.getAuthorizationData();

        if ( IS_DEBUG )
        {
            LOG.debug( "AuthorizationData : " + authorizationData );
        }
View Full Code Here

        newTicketPart.setCRealm( tgt.getEncTicketPart().getCRealm() );

        if ( request.getKdcReqBody().getEncAuthorizationData() != null )
        {
            byte[] authorizationData = cipherTextHandler.decrypt( authenticator.getSubKey(), request.getKdcReqBody().getEncAuthorizationData(), KeyUsage.TGS_REQ_KDC_REQ_BODY_AUTHZ_DATA_ENC_WITH_TGS_SESS_KEY );
            AuthorizationData authData = KerberosDecoder.decodeAuthorizationData( authorizationData );
            authData.addEntry( tgt.getEncTicketPart().getAuthorizationData().getCurrentAD() );
            newTicketPart.setAuthorizationData( authData );
        }

        processTransited( newTicketPart, tgt );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.kerberos.components.AuthorizationData

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.