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
@Extension public class JwtAuthenticationServiceImpl extends JwtAuthenticationService
Default implementation ofJwtAuthenticationService
- Author:
- Vivek Pandey
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description JwtAuthenticationServiceImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
String
getIconFileName()
net.sf.json.JSONObject
getJwkSet()
Binds Json web keys to the URL space.static JwtAuthenticationStore
getJwtStore(org.springframework.security.core.Authentication authentication)
JwtToken
getToken(Integer expiryTimeInMins, Integer maxExpiryTimeInMins)
Gives JWT token for authenticated user.-
Methods inherited from class io.jenkins.blueocean.auth.jwt.JwtAuthenticationService
getJwks, getUrlName
-
-
-
-
Method Detail
-
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:
- the JWK Set Format spec
-
getIconFileName
public String getIconFileName()
-
getDisplayName
public String getDisplayName()
-
getJwtStore
public static JwtAuthenticationStore getJwtStore(org.springframework.security.core.Authentication authentication)
-
-