public class RadiusAuthenticationProvider
extends org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
Constructor and Description |
---|
RadiusAuthenticationProvider(String server,
String sharedSecret)
Create an instance using the supplied server and shared secret.
|
Modifier and Type | Method and Description |
---|---|
protected void |
additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails,
org.springframework.security.authentication.UsernamePasswordAuthenticationToken token) |
protected void |
doAfterPropertiesSet()
doAfterPropertiesSet
|
protected org.springframework.security.core.userdetails.UserDetails |
retrieveUser(String username,
org.springframework.security.authentication.UsernamePasswordAuthenticationToken token) |
void |
setAuthTypeClass(Class<? extends net.jradius.client.auth.RadiusAuthenticator> authTypeClass)
Sets the authenticator, which determines the authentication type (PAP, CHAP, etc)
|
void |
setDefaultRoles(String defaultRoles)
Sets the default authorities (roles) that should be assigned to authenticated users
|
void |
setPort(int port)
Sets the port number the radius server is listening on
|
void |
setRetries(int retries)
Sets the number of times to retry a timed-out authentication request
|
void |
setRolesAttribute(String rolesAttribute)
Sets the name of a radius attribute to be returned by the radius server
with a comma-separated list of authorities (roles) to be assigned to the user
If this is not set, or if the specified attribute is not found in the reply
from the radius server, defaultRoles will be used to assign roles
If JRadius's built-in attribute dictionary does not contain the desired
attribute name, use "Unknown-VSAttribute(
|
void |
setTimeout(int timeout)
Sets the authentication timeout (in seconds)
|
afterPropertiesSet, authenticate, createSuccessAuthentication, getPostAuthenticationChecks, getPreAuthenticationChecks, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setAuthoritiesMapper, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setPostAuthenticationChecks, setPreAuthenticationChecks, setUserCache, supports
protected void doAfterPropertiesSet() throws Exception
doAfterPropertiesSet
doAfterPropertiesSet
in class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
Exception
- if any.public void setPort(int port)
port
- (defaults to 1812)public void setTimeout(int timeout)
timeout
- (defaults to 5)public void setRetries(int retries)
retries
- (defaults to 3)public void setAuthTypeClass(Class<? extends net.jradius.client.auth.RadiusAuthenticator> authTypeClass)
authTypeClass
- An instance of net.jradius.client.auth.RadiusAuthenticator (defaults to PAPAuthenticator)public void setDefaultRoles(String defaultRoles)
defaultRoles
- comma-separated list of roles (defaults to "ROLE_USER")public void setRolesAttribute(String rolesAttribute)
rolesAttribute
- a String
object.protected void additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken token) throws org.springframework.security.core.AuthenticationException
additionalAuthenticationChecks
in class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
org.springframework.security.core.AuthenticationException
protected org.springframework.security.core.userdetails.UserDetails retrieveUser(String username, org.springframework.security.authentication.UsernamePasswordAuthenticationToken token) throws org.springframework.security.core.AuthenticationException
retrieveUser
in class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
org.springframework.security.core.AuthenticationException
Copyright © 2021. All rights reserved.