Posts

Showing posts from March 1, 2019

Open FileDescriptor for reading and writing with a Channel

Image
1 I have a FileDescriptor and would like to open it for reading and writing using a single channel. I can use streams like so to get one channel for reading, and one channel for writing, but I would prefer a single channel. FileChannel in = new FileInputStream(fd).getChannel(); FileChannel out = new FileOutputStream(fd).getChannel(); java share | improve this question asked Jul 26 '16 at 4:28 RedHatter RedHatter 818 1 12 28 ...

ExpressJS : POST request with LDAP API

Image
0 I am trying to implement a POST method that will simply post the username and password to my Mongodb . However, before posting the credentials, it must connect to LDAP API to authenticate. The LDAP API has a header, Basic Authentication, and as an ADMIN I must provide a specific username and password to access that specific LDAP(different from user credentials). My question is I have searched and asked a lot, and I came to a conclusion that the proper method to do so is to use AXIOS for such HTTP request. Unfortunately I have not found a solution to the following doubts: How to pass the username and password(USER credentials) to the LDAP API to verify? How to pass the LDAP API username and password to connect to the LDAP and have access to it. These are the LDAP information that I need to establish the ...