This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.springframework.core.convert.converter; | |
public interface Converter<S, T> { | |
T convert(S source); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans:bean id="userDetailsService" class="x.y.z.UserDetailsService" /> | |
<beans:bean id="yubikeyAuthenticationProvider" | |
class="com.curlapp.yubikey.YubikeyAuthenticationProvider" | |
p:userDetailsService-ref="userDetailsService" | |
p:yubicoClientId="******" /> | |
<authentication-manager alias="authenticationManager"> | |
<authentication-provider ref="yubikeyAuthenticationProvider"/> | |
</authentication-manager> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.security.core.userdetails.UserDetails; | |
public interface YubikeyUserDetails extends UserDetails { | |
String getPublicId(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>com.yubico</groupId> | |
<artifactId>yubico-validation-client2</artifactId> | |
<version>2.0.1</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.curlapp.yubikey; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.InitializingBean; | |
import org.springframework.security.authentication.AccountExpiredException; | |
import org.springframework.security.authentication.AuthenticationProvider; | |
import org.springframework.security.authentication.BadCredentialsException; | |
import org.springframework.security.authentication.CredentialsExpiredException; | |
import org.springframework.security.authentication.DisabledException; |
NewerOlder