All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.payneteasy.superfly.security.SuperflyAuthenticationProvider Maven / Gradle / Ivy

Go to download

Module for Spring Security which enables application to use Superfly authentication/authorization declaratively through Spring Security

There is a newer version: 1.7-32
Show newest version
package com.payneteasy.superfly.security;

import org.springframework.beans.factory.annotation.Required;

import com.payneteasy.superfly.api.SSOService;
import com.payneteasy.superfly.api.SSOUser;
import com.payneteasy.superfly.security.authentication.UsernamePasswordAuthRequestInfoAuthenticationToken;

/**
 * Authentication provider which is able to authenticate against the following
 * pair: .
 * 
 * @author Roman Puchkovskiy
 */
public class SuperflyAuthenticationProvider extends AbstractSuperflyAuthenticationProvider {
	
	private SSOService ssoService;
	
	@Required
	public void setSsoService(SSOService ssoService) {
		this.ssoService = ssoService;
	}

	@Override
	protected SSOUser doAuthenticate(
			UsernamePasswordAuthRequestInfoAuthenticationToken authRequest,
			String username, String password) {
		SSOUser ssoUser = ssoService.authenticate(username, password,
				authRequest.getAuthRequestInfo());
		return ssoUser;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy