external Login with Spring Security

I got my simple spring security login:


public class ServiceConfig extends GlobalAuthenticationConfigurerAdapter {

public void init(AuthenticationManagerBuilder auth) throws Exception {


.withUser("username").password("{noop}"+ "key").roles("USER");




protected void configure(HttpSecurity http) throws Exception {






.loginPage("/login").defaultSuccessUrl("/login-success", true)









My problem is, I got an external login that I need to use:

//Do KeydoxLogin


public void doLogonKdx(@RequestBody KeyData msg) {

KdxFunctions logon = new KdxFunctions();

//My external login on keydox server - works just fine

boolean doLogon = logon.doLogon(msg.getName(), msg.getKey());

// Hand over my login data through angularJS

if(doLogon) {


// Shows success if logon returns true - just so I can see

}else {


// Shows faield if logon returns false...

Read More »

By: StackOverFlow - Wednesday, 7 November

Related Posts