Tabnine Logo
LdapPrincipal.getDn
Code IndexAdd Tabnine to your IDE (free)

How to use
getDn
method
in
org.apache.directory.server.core.api.LdapPrincipal

Best Java code snippets using org.apache.directory.server.core.api.LdapPrincipal.getDn (Showing top 9 results out of 315)

origin: org.apache.directory.server/apacheds-core-api

/**
 * Serializes a LdapPrincipal instance.
 * 
 * @param principal The LdapPrincipal instance to serialize
 * @param out The stream into which we will write the serialized instance
 * @throws IOException If the stream can't be written
 */
public static void serialize( LdapPrincipal principal, ObjectOutput out ) throws IOException
{
  // The Authentication level
  out.writeInt( principal.getAuthenticationLevel().getLevel() );
  // The principal's DN
  if ( principal.getDn() == null )
  {
    Dn.EMPTY_DN.writeExternal( out );
  }
  else
  {
    principal.getDn().writeExternal( out );
  }
}
origin: org.apache.directory.server/apacheds-interceptors-trigger

  public boolean hasPermission( OperationContext opContext ) throws LdapException
  {
    Dn principalName = opContext.getSession().getEffectivePrincipal().getDn();
    return principalName.equals( opContext.getSession().getDirectoryService().getAdminSession()
      .getAuthenticatedPrincipal().getDn() );
  }
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * Creates a new instance of UnbindOperationContext.
 * 
 * @param session The session to use
 */
public UnbindOperationContext( CoreSession session )
{
  super( session, session.getEffectivePrincipal().getDn() );
  setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
}
origin: org.apache.directory.server/apacheds-core-api

/**
 * Creates a new instance of UnbindOperationContext.
 * 
 * @param session The session to use
 * @param unbindRequest The UnbindRequest to process
 */
public UnbindOperationContext( CoreSession session, UnbindRequest unbindRequest )
{
  super( session, session.getEffectivePrincipal().getDn() );
  setRequestControls( unbindRequest.getControls() );
  setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
}
origin: org.apache.directory.server/apacheds-protocol-ldap

/**
 * {@inheritDoc}
 */
public void handleExtendedOperation( LdapSession requestor, WhoAmIRequest req ) throws Exception
{
  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 );
}
origin: org.apache.directory.server/apacheds-interceptors-operational

boolean isAdmin = modifyContext.getSession().getAuthenticatedPrincipal().getDn().equals( adminDn );
origin: org.apache.directory.server/apacheds-protocol-ldap

Dn principalDn = requestor.getCoreSession().getEffectivePrincipal().getDn();
origin: org.apache.directory.server/apacheds-protocol-ldap

CoreSession userSession = ds.getSession( ldapPrincipal.getDn(),
  password, saslMechanism, null );
origin: org.apache.directory.server/apacheds-interceptors-operational

boolean isAdmin = addContext.getSession().getAuthenticatedPrincipal().getDn().equals( adminDn );
org.apache.directory.server.core.apiLdapPrincipalgetDn

Javadoc

Gets a cloned copy of the normalized distinguished name of this principal as a org.apache.directory.api.ldap.model.name.Dn.

Popular methods of LdapPrincipal

  • getName
    Returns the normalized distinguished name of the principal as a String.
  • <init>
    Creates a new LDAP/X500 principal without any group associations. Keep this package friendly so only
  • getAuthenticationLevel
    Gets the authentication level associated with this LDAP principle.
  • getUserPasswords
  • setUserPassword
  • clone
    Clone the object. This is done so that we don't store the password in a LdapPrincipal more than nece
  • setClientAddress
  • setSchemaManager
  • setServerAddress

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • BoxLayout (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now