I have a REST server over SSL. Initially, the client logs in with the credentials. To avoid sending the username/password for each request, I have created a custom token which is returned to the user in the login procedure. This token contains some information about the client (IP and user-agent) as well as an expiration time; and of course the token is sent encrypted.
Further calls include the token in a custom header field; which are verified in IDispatchMessageInspector
The approach works fine, but I am pretty sure it's not a good approach. Is there any benefit in using custom authentication than the message inspection?