Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am implementing spring security with the existing LDAP where the password are SSHA512 encoded. The deprecated LdapShaEncoder supports only {SHA} and {SSHA}.
Can anyone help me implement a java SSHA512 encoder along with Spring security. Or Are there any libraries which can do the job?
import org.springframework.security.crypto.password.LdapShaPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
#Bean
public PasswordEncoder passwordEncoder() {
return new LdapShaPasswordEncoder();
}
Exception:
java.lang.IllegalArgumentException: Unsupported password prefix '{SSHA512}'
at org.springframework.security.crypto.password.LdapShaPasswordEncoder.matches(LdapShaPasswordEncoder.java:173) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.security.crypto.password.LdapShaPasswordEncoder.matches(LdapShaPasswordEncoder.java:158) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.security.authentication.dao.DaoAuthenticationProvider.additionalAuthenticationChecks(DaoAuthenticationProvider.java:90) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:166) ~[spring-security-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]
Have a look here: https://github.com/lathspell/java_test/tree/master/java_test_openldap
I basically just exchanged the SHA by SHA-512 in MessageDigest.getInstance() and adjusted the prefix and length constants.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I need help...My problem is:
Page source:
<select name="year" id="year" class="form-control select-inline">
<option>1990</option>
<option>1991</option>
<option>1992</option>
<option>1193</option>
</select>
In delphi 7, use:
WebBrowser1.OleObject.Document.All.Item('year', 0).value := '1990';
But form site continue in blank...Help me please
TWebBrowser is just a wrapper for the Internet Explorer ActiveX control, so this is really an IE DOM issue, not a Delphi issue.
Try setting the select element's selectedIndex property instead of its value property:
WebBrowser1.OleObject.Document.All.Item('year', 0).selectedIndex := 0;
The value property is what gets transmitted to the server, but only of there is an item selected to begin with.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I need to make xml file which looks like this:
> <message xmlns="client"
> from="from_user" to="To_user"
> type="chat"><properties
> xmlns="#"http://software""><property><name>assetId</name><value
> type="string">5346879f73322e08db030000</value></property><property><name>status</name><value
> type="string">success</value></property><property><name>long</name><value
> type="double">22.3451</value></property>
> <property><name>lan</name><value type="double">3456</value></property>
> </properties></message>
I don't know how to do it. Could you help me?
Either create it in Notepad or learn XSD and generate it.
Check this
http://www.w3schools.com/xml/default.ASP
and when you are done, learn this:
http://www.w3schools.com/Schema/
you may Create it this way
NSString *str = [NSString stringWithString:#"<message xmlns=\"client\"from=\"from_user\" to=\"To_user\" type=\"chat\"><properties xmlns=\"#\"http://software\"\"><property><name>assetId</name><value type=\"string\">5346879f73322e08db030000</value></property><property><name>status</name><value type=\"string\">success</value></property><property><name>long</name><value type=\"double\">22.3451</value></property> <property><name>lan</name><value type=\"double\">3456</value></property> </properties></message>"];
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
i have stored procedure sp_1 in server_A .i am calling this SP from Server_B
the code is:exec Server_A.MyDb.dbo.SP_1 in the body of sp i have complicted logic in the final step I insert result to Table_A.
running sp take 10 minute and return 'command complete successfully' but tabe_A is Empty (must be filled).
i try to execute the body of script it work properly .and tble Fill as expect.
i do'nt know what is wrong...?
i try to execute sp_1 from Another server 'server_c' server_d it work fine.
problem is with server_B
i found the anwser the problem is with Remote Query Timeout set to 600 sec
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm attempting to use the heroku.api. because the heroku gem has been depreciated.
What I've found is a convoluted dogs breakfast.
Get the api gem, validate the key on one site, use a curl command on another site. Then call the methods..
My app is running on heroku. I suspect it knows this.. Why make me jump through hoops to us something on their system designed by them/for them.
Anyway..
Does anyone know of a tutorial on how to do something with this API? Like getting the stack I'm on (in code) or getting the number of workers/dyno's I've got running? Really anything that works... just so I can see how to get it working
OK, so first thing: the heroku gem is deprecated, but the heroku toolbelt works in a nearly identical fashion. There's no NEED to transition to direct API calls unless you were doing that programmatically in your application. If you were doing that, read on:
Use the heroku-api wrapper.
gem install heroku-api
Get your API_KEY from https://dashboard.heroku.com/account
If you want to get the stack of the app named "your-app-here"
require 'heroku-api'
heroku = Heroku::API.new(:api_key => YOUR_API_KEY)
puts heroku.get_app('your-app-here').body["stack"]
Or tell how many processes you currently have:
total_processes = heroku.get_ps('your-app-here').body.count
Scale to 2 web processes:
heroku.post_ps_scale('your-app-here', 'web', '2')
All the info you need: https://github.com/heroku/heroku.rb
Maybe I misunderstood what you are trying to do, but I did the following based on their documentation.
curl -H "Accept: application/json" -u :SECRET -X GET https://api.heroku.com/apps
https://api-docs.heroku.com/apps
This will return a json object:
[
{
"id": 000000,
"name": "example",
"create_status": "complete",
"created_at": "2011/01/01 00:00:00 -0700",
"stack": "bamboo-ree-1.8.7",
"requested_stack": null,
"repo_migrate_status": "complete",
"slug_size": 1000000,
"repo_size": 1000000,
"dynos": 1,
"workers": 0
}
]
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 months ago.
The community reviewed whether to reopen this question 3 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
How do I store data to be used for all the clients in my server? (like the messages of a chat)
The server that node.js allows you to build, is an application server, which means that state is preserved, between request, on the server side. The following snippet demonstrates this:
var sys = require('sys'),
http = require('http');
var number = 0;
http.createServer(function (req, res) {
console.log(req.method, req.url);
res.writeHead(200, {'Content-Type': 'text/html'});
res.write('<h1>Number is: ' + number + '</h1>');
res.end();
number++;
}).listen(8000);
sys.puts('Server running at http://127.0.0.1:8000/');
node-cache package is currently the best for key value store and it allows synchronous as well as async storage/retrieval/deletion of keys.
npm link
If you want more features have a look at redis-node-client
Or use a native node storage mechanism (written in node.js)
http://github.com/felixge/node-dirty