Class JwtAuthenticationServiceImpl
java.lang.Object
io.jenkins.blueocean.auth.jwt.JwtAuthenticationService
io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationServiceImpl
- All Implemented Interfaces:
ExtensionPoint
,Action
,ModelObject
,RootAction
,UnprotectedRootAction
Default implementation of
JwtAuthenticationService
- Author:
- Vivek Pandey
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnet.sf.json.JSONObject
Binds Json web keys to the URL space.static JwtAuthenticationStore
getJwtStore
(org.springframework.security.core.Authentication authentication) Gives JWT token for authenticated user.Methods inherited from class io.jenkins.blueocean.auth.jwt.JwtAuthenticationService
getJwks, getUrlName
-
Constructor Details
-
JwtAuthenticationServiceImpl
public JwtAuthenticationServiceImpl()
-
-
Method Details
-
getToken
public JwtToken getToken(@Nullable @QueryParameter("expiryTimeInMins") Integer expiryTimeInMins, @Nullable @QueryParameter("maxExpiryTimeInMins") Integer maxExpiryTimeInMins) Description copied from class:JwtAuthenticationService
Gives JWT token for authenticated user. See https://tools.ietf.org/html/rfc7519.- Specified by:
getToken
in classJwtAuthenticationService
- Parameters:
expiryTimeInMins
- token expiry time. Default 30 min.maxExpiryTimeInMins
- max token expiry time. Default expiry time is 8 hours (480 mins)- Returns:
- JWT if there is authenticated user or if anonymous user has at least READ permission, otherwise 401 error code is returned
-
getJwkSet
public net.sf.json.JSONObject getJwkSet()Description copied from class:JwtAuthenticationService
Binds Json web keys to the URL space.- Specified by:
getJwkSet
in classJwtAuthenticationService
- Returns:
- a JWKS
- See Also:
-
getIconFileName
-
getDisplayName
-
getJwtStore
public static JwtAuthenticationStore getJwtStore(org.springframework.security.core.Authentication authentication)
-