Showing posts with label junit. Show all posts
Showing posts with label junit. Show all posts

Saturday, April 23, 2016

How to create a client for 'X-Auth-Token' authentication over Spring Security implementation on a Rest Service?

I am building an application for practicing an architecture and its balance, I have to create a client for testing purpose, the rest service use tokens for authentication implementing Spring Security that employs: authentication-manager, security http, AuthenticationTokenProcessingFilter, intercept-url and tokens, so after some reading I have to resolve 'X-Auth-Token' inject on headers and authentication part, the following lines are for testing this king of Authentication:

By now we have a client for test authentication and authorization for next steps.

Best regards,

Wednesday, July 17, 2013

Exception: NoSuchMethodError, org.springframework.beans.factory.annotation.InjectionMetadata

If you are doing Unit Test with Spring Framework you will have to keeping the correct configuration of jar files that you have in you repository, sometimes if you dont have all the jar´s in you classpath exceptions will occur like this one:

java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class,

With a stacktrace like this one...

It is said that you dont have the correct jar with the request method, after the first line of the above stack you can follow the method of the request jar, in this is case you see: "org.springframework.orm", finally you only need to add spring-orm dependency or jar file to your classpath.

 
Best Regards,