C# 클래스 pGina.Plugin.Ldap.LdapServer

상속: IDisposable
파일 보기 프로젝트 열기: pgina/pgina 1 사용 예제들

공개 메소드들

메소드 설명
Authenticate ( string uname, string password ) : BooleanResult

Attempt to authenticate the user by binding to the LDAP server.

Bind ( ) : void

Tries to bind to the server anonymously. Throws LdapException if the bind fails.

Bind ( NetworkCredential creds ) : void

Try to bind to the LDAP server with the given credentials. This uses basic authentication. Throws LdapException if the bind fails.

BindForSearch ( ) : void
Close ( ) : void
Dispose ( ) : void
FindFirstDN ( string searchBase, string filter ) : string

Does a search in the subtree at searchBase, using the filter provided and returns the DN of the first match.

GetUserDN ( string uname ) : string
LdapServer ( ) : System
MemberOfGroup ( string user, string group ) : bool
SetUserAttribute ( string uname, string attribute, string value ) : void

비공개 메소드들

메소드 설명
Connect ( ) : void
CreateSearchFilter ( string uname ) : string

This generates the search filter to be used when searching for the DN

CreateUserDN ( string uname ) : string

This generates the DN for the user assuming that a pattern has been provided. This assumes that Settings.Store.DnPattern has a valid DN pattern.

FindUserDN ( string uname ) : string

Attempts to find the DN for the user by searching a set of LDAP trees. The base DN for each of the trees is retrieved from Settings.Store.SearchContexts. The search filter is taken from Settings.Store.SearchFilter. If all searches fail, this method returns null.

VerifyCert ( System.DirectoryServices.Protocols.LdapConnection conn, X509Certificate cert ) : bool

This is the verify certificate callback method used when initially binding to the LDAP server. This manages all certificate validation.

메소드 상세

Authenticate() 공개 메소드

Attempt to authenticate the user by binding to the LDAP server.
public Authenticate ( string uname, string password ) : BooleanResult
uname string
password string
리턴 pGina.Shared.Types.BooleanResult

Bind() 공개 메소드

Tries to bind to the server anonymously. Throws LdapException if the bind fails.
public Bind ( ) : void
리턴 void

Bind() 공개 메소드

Try to bind to the LDAP server with the given credentials. This uses basic authentication. Throws LdapException if the bind fails.
public Bind ( NetworkCredential creds ) : void
creds System.Net.NetworkCredential The credentials to use when binding.
리턴 void

BindForSearch() 공개 메소드

public BindForSearch ( ) : void
리턴 void

Close() 공개 메소드

public Close ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

FindFirstDN() 공개 메소드

Does a search in the subtree at searchBase, using the filter provided and returns the DN of the first match.
public FindFirstDN ( string searchBase, string filter ) : string
searchBase string The DN of the root of the subtree for the search (search context).
filter string The search filter.
리턴 string

GetUserDN() 공개 메소드

public GetUserDN ( string uname ) : string
uname string
리턴 string

LdapServer() 공개 메소드

public LdapServer ( ) : System
리턴 System

MemberOfGroup() 공개 메소드

public MemberOfGroup ( string user, string group ) : bool
user string
group string
리턴 bool

SetUserAttribute() 공개 메소드

public SetUserAttribute ( string uname, string attribute, string value ) : void
uname string
attribute string
value string
리턴 void