Package org.apache.directory.server.kerberos.shared.messages.value

Examples of org.apache.directory.server.kerberos.shared.messages.value.PrincipalName


    }


    protected PrincipalName getPrincipalName( String name )
    {
        PrincipalName principalName = new PrincipalName();
        principalName.addName( name );
        principalName.setNameType( PrincipalNameType.KRB_NT_PRINCIPAL );

        return principalName;
    }
View Full Code Here


     */
    public void setServerPrincipal( KerberosPrincipal serverPrincipal ) throws InvalidTicketException
    {
        try
        {
            sName = new PrincipalName( serverPrincipal.getName(), serverPrincipal.getNameType() );
            realm = serverPrincipal.getRealm();
        }
        catch ( ParseException pe )
        {
            LOG.error( I18n.err( I18n.ERR_135, serverPrincipal, pe.getLocalizedMessage() ) );
View Full Code Here

     * @param sequence
     * @return The {@link PrincipalName}.
     */
    public static PrincipalName decode( DERSequence sequence )
    {
        PrincipalName principalName = new PrincipalName();

        for ( Enumeration<DEREncodable> e = sequence.getObjects(); e.hasMoreElements(); )
        {
            DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
            int tag = object.getTagNo();
            DEREncodable derObject = object.getObject();

            switch ( tag )
            {
                case 0:
                    DERInteger nameType = ( DERInteger ) derObject;
                    principalName.setNameType( nameType.intValue() );
                    break;
                   
                case 1:
                    DERSequence nameString = ( DERSequence ) derObject;
                    decodeNameString( nameString, principalName );
View Full Code Here

    }


    private PrincipalName getPrincipalName( String name )
    {
        PrincipalName principalName = new PrincipalName();
        principalName.addName( name );
        principalName.setNameType( PrincipalNameType.KRB_NT_PRINCIPAL );

        return principalName;
    }
View Full Code Here

    }


    protected PrincipalName getPrincipalName( String name )
    {
        PrincipalName principalName = new PrincipalName();
        principalName.addName( name );
        principalName.setNameType( PrincipalNameType.KRB_NT_PRINCIPAL );

        return principalName;
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.kerberos.shared.messages.value.PrincipalName

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.