Package io.jenkins.blueocean.auth.jwt
Class JwtToken
java.lang.Object
io.jenkins.blueocean.auth.jwt.JwtToken
- All Implemented Interfaces:
org.kohsuke.stapler.HttpResponse
Generates JWT token
- Author:
- Vivek Pandey
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generateResponse
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object node) Writes the token as an HTTP response.sign()
Generates base64 representation of JWT token sign using "RS256" algorithm getHeader().toBase64UrlEncode() + "." + getClaim().toBase64UrlEncode() + "." + sign
-
Field Details
-
X_BLUEOCEAN_JWT
JwtToken
is sent as HTTP header of name.- See Also:
-
header
public final net.sf.json.JSONObject headerJWT header -
claim
public final net.sf.json.JSONObject claimJWT Claim
-
-
Constructor Details
-
JwtToken
public JwtToken()
-
-
Method Details
-
sign
Generates base64 representation of JWT token sign using "RS256" algorithm getHeader().toBase64UrlEncode() + "." + getClaim().toBase64UrlEncode() + "." + sign- Returns:
- base64 representation of JWT token
-
generateResponse
public void generateResponse(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, Object node) throws IOException, javax.servlet.ServletException Writes the token as an HTTP response.- Specified by:
generateResponse
in interfaceorg.kohsuke.stapler.HttpResponse
- Throws:
IOException
javax.servlet.ServletException
-