Register and join over 40,000 other developers!
Recent Topics
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

3 replies to this topic
#1
Posted 19 March 2012 - 06:05 AM
Hello,
I would like to ask how I can achieve an authentication for user to the server in Java, using user's username.
Thanks in advance,
toto_7
I would like to ask how I can achieve an authentication for user to the server in Java, using user's username.
Thanks in advance,
toto_7
"Programming is like **. One mistake and you have to support it for the rest of your life."
-Michael Sinz
#2
Posted 19 March 2012 - 06:41 AM
Simple:
- html form sends username and password to the server.
- Server checks if they are correct
- If yes: put something in the session.
#3
Posted 19 March 2012 - 06:53 AM
wim DC thanks for quick response. I think your answer is not what I'm looking for and that's my fault. My project is based on Java RMI so now I'm trying to implement a kind of security between server and clients. So I'm generating a pair of keys for each and now I'm looking a way to confirm that this client is who
"Programming is like **. One mistake and you have to support it for the rest of your life."
-Michael Sinz
#4
Posted 19 March 2012 - 07:04 AM
Well, I would start by using these:
SslRMIServerSocketFactory (Java 2 Platform SE 5.0)
&
SslRMIClientSocketFactory (Java 2 Platform SE 5.0)
So then at least the client / server communication is already secured.
And then either make a login object that returns a token (a random string) when the client logs in. Then this token has to be sent for every next call to the server so it can check that token. (or you can send username/ password for every method call)
... I guess. Can't be sure I'm not really into the RMI stuff.
SslRMIServerSocketFactory (Java 2 Platform SE 5.0)
&
SslRMIClientSocketFactory (Java 2 Platform SE 5.0)
So then at least the client / server communication is already secured.
And then either make a login object that returns a token (a random string) when the client logs in. Then this token has to be sent for every next call to the server so it can check that token. (or you can send username/ password for every method call)
... I guess. Can't be sure I'm not really into the RMI stuff.
Also tagged with one or more of these keywords: authentication
![]() User roles in ASP.NET MVC 5Started by jasonalien, 19 Jan 2015 ![]() |
|
![]() |
||
General Forums →
General Programming →
Providing web resources only to authenticated usersStarted by Kaishain, 01 Feb 2014 ![]() |
|
![]() |
||
![]() Quick question: User roles for asp.net websitesStarted by PuddingEatsPanda, 25 Nov 2013 ![]() |
|
![]() |
||
Language Forums →
PHP →
Extending a User Management ModuleStarted by rhossis, 19 Jul 2013 ![]() |
|
![]() |
||
General Forums →
General Programming →
USB EncryptionStarted by Alcamech, 12 Jul 2013 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download