Package org.apache.directory.api.ldap.extras.extended.whoAmI

Examples of org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIResponseImpl


    {
        LOG.debug( "WhoAmI requested" );

        LdapPrincipal ldapPrincipal = requestor.getCoreSession().getAuthenticatedPrincipal();
       
        WhoAmIResponse whoAmIResponse = new WhoAmIResponseImpl( req.getMessageId(), ResultCodeEnum.SUCCESS );

        String authzId = "dn:" + ldapPrincipal.getDn();
        whoAmIResponse.setAuthzId( Strings.getBytesUtf8( authzId ) );
       
        // write the response
        requestor.getIoSession().write( whoAmIResponse );
    }
View Full Code Here


     * {@inheritDoc}
     */
    public WhoAmIResponse newResponse( byte[] encodedValue ) throws DecoderException
    {
        WhoAmIResponseDecorator response = new WhoAmIResponseDecorator( codec,
            new WhoAmIResponseImpl() );
        response.setResponseValue( encodedValue );
        return response;
    }
View Full Code Here

            StringWriter sw = new StringWriter();
            de.printStackTrace( new PrintWriter( sw ) );
            String stackTrace = sw.toString();

            // Error while decoding the value.
            whoAmIResponse = new WhoAmIResponseImpl(
                decoratedResponse.getMessageId(),
                ResultCodeEnum.OPERATIONS_ERROR,
                stackTrace );
        }
View Full Code Here

                    "Store AuthzId" )
                {
                    public void action( WhoAmIResponseContainer container ) throws DecoderException
                    {
                        WhoAmIResponseDecorator whoAmIResponse = new WhoAmIResponseDecorator(
                            LdapApiServiceFactory.getSingleton(), new WhoAmIResponseImpl() );
                        container.setWhoAmIResponse( whoAmIResponse );
                       
                        byte[] data = container.getCurrentTLV().getValue().getData();
                       
                        if ( data != null )
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIResponseImpl

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.