Class RedisAuthService
- java.lang.Object
-
- org.odpi.openmetadata.userinterface.uichassis.springboot.auth.RoleService
-
- org.odpi.openmetadata.userinterface.uichassis.springboot.auth.TokenSettings
-
- org.odpi.openmetadata.userinterface.uichassis.springboot.auth.RedisAuthService
-
- All Implemented Interfaces:
AuthService
public class RedisAuthService extends TokenSettings implements AuthService
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.userinterface.uichassis.springboot.auth.TokenSettings
tokenSecret, tokenTimeout
-
Fields inherited from interface org.odpi.openmetadata.userinterface.uichassis.springboot.auth.AuthService
AUTH_HEADER_NAME
-
-
Constructor Summary
Constructors Constructor Description RedisAuthService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)Add the authentication on the response after performs other operations like persistence server sideStringcreateTokenForUser(TokenUser user, String secret)creates a token without expiration expiration is to be validated against redisorg.springframework.security.core.AuthenticationgetAuthentication(javax.servlet.http.HttpServletRequest request)-
Methods inherited from class org.odpi.openmetadata.userinterface.uichassis.springboot.auth.TokenSettings
getTokenTimeout
-
Methods inherited from class org.odpi.openmetadata.userinterface.uichassis.springboot.auth.RoleService
extractUserAppRoles
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.odpi.openmetadata.userinterface.uichassis.springboot.auth.AuthService
extractUserAppRoles, fromJSON, getTokenTimeout, getTokenUser, parseUserFromToken, toJSON
-
-
-
-
Method Detail
-
addAuthentication
public void addAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)Description copied from interface:AuthServiceAdd the authentication on the response after performs other operations like persistence server side- Specified by:
addAuthenticationin interfaceAuthService- Parameters:
request- the http requestresponse- the http responseauthentication- the authentication
-
getAuthentication
public org.springframework.security.core.Authentication getAuthentication(javax.servlet.http.HttpServletRequest request)
- Specified by:
getAuthenticationin interfaceAuthService
-
createTokenForUser
public String createTokenForUser(TokenUser user, String secret)
creates a token without expiration expiration is to be validated against redis- Specified by:
createTokenForUserin interfaceAuthService- Parameters:
user- the user to create token forsecret- the secret for signature- Returns:
- jwt token
-
-