Package com.wso2.jwt.token.builder
Class JWTAccessTokenBuilder
- java.lang.Object
-
- org.wso2.carbon.identity.oauth2.token.OauthTokenIssuerImpl
-
- com.wso2.jwt.token.builder.JWTAccessTokenBuilder
-
- All Implemented Interfaces:
org.wso2.carbon.identity.oauth2.token.OauthTokenIssuer
public class JWTAccessTokenBuilder extends org.wso2.carbon.identity.oauth2.token.OauthTokenIssuerImplJWTAccessTokenBuilder.
-
-
Constructor Summary
Constructors Constructor Description JWTAccessTokenBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringaccessToken(org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext oAuthAuthzReqMessageContext)java.lang.StringaccessToken(org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext oAuthTokenReqMessageContext)protected java.lang.StringbuildIDToken(org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext request)Build a signed jwt token from authorization request message contextprotected java.lang.StringbuildIDToken(org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext request)To build id token from OauthToken request message contextprotected com.nimbusds.jose.JWSAlgorithmmapSignatureAlgorithm(java.lang.String signatureAlgorithm)This method map signature algorithm define in identity.xml to nimbus signature algorithm format, Strings are defined inline hence there are not being used any whereprotected java.lang.StringsignJWT(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext request)protected java.lang.StringsignJWT(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext request)Generic Signing functionprotected java.lang.StringsignJWTWithRSA(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext request)protected java.lang.StringsignJWTWithRSA(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext request)sign JWT token from RSA algorithm
-
-
-
Method Detail
-
accessToken
public java.lang.String accessToken(org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext oAuthTokenReqMessageContext) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException- Specified by:
accessTokenin interfaceorg.wso2.carbon.identity.oauth2.token.OauthTokenIssuer- Overrides:
accessTokenin classorg.wso2.carbon.identity.oauth2.token.OauthTokenIssuerImpl- Throws:
org.apache.oltu.oauth2.common.exception.OAuthSystemException
-
accessToken
public java.lang.String accessToken(org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext oAuthAuthzReqMessageContext) throws org.apache.oltu.oauth2.common.exception.OAuthSystemException- Specified by:
accessTokenin interfaceorg.wso2.carbon.identity.oauth2.token.OauthTokenIssuer- Overrides:
accessTokenin classorg.wso2.carbon.identity.oauth2.token.OauthTokenIssuerImpl- Throws:
org.apache.oltu.oauth2.common.exception.OAuthSystemException
-
buildIDToken
protected java.lang.String buildIDToken(org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext request) throws org.wso2.carbon.identity.oauth2.IdentityOAuth2ExceptionTo build id token from OauthToken request message context- Parameters:
request- Token request message context- Returns:
- Signed jwt string.
- Throws:
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception
-
buildIDToken
protected java.lang.String buildIDToken(org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext request) throws org.wso2.carbon.identity.oauth2.IdentityOAuth2ExceptionBuild a signed jwt token from authorization request message context- Parameters:
request- Oauth authorization message context- Returns:
- Signed jwt string
- Throws:
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception
-
signJWTWithRSA
protected java.lang.String signJWTWithRSA(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext request) throws org.wso2.carbon.identity.oauth2.IdentityOAuth2Exceptionsign JWT token from RSA algorithm- Parameters:
jwtClaimsSet- contains JWT bodyrequest-- Returns:
- signed JWT token
- Throws:
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception
-
signJWTWithRSA
protected java.lang.String signJWTWithRSA(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext request) throws org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception- Throws:
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception
-
signJWT
protected java.lang.String signJWT(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.token.OAuthTokenReqMessageContext request) throws org.wso2.carbon.identity.oauth2.IdentityOAuth2ExceptionGeneric Signing function- Parameters:
jwtClaimsSet- contains JWT bodyrequest-- Returns:
- Throws:
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception
-
signJWT
protected java.lang.String signJWT(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet, org.wso2.carbon.identity.oauth2.authz.OAuthAuthzReqMessageContext request) throws org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception- Throws:
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception
-
mapSignatureAlgorithm
protected com.nimbusds.jose.JWSAlgorithm mapSignatureAlgorithm(java.lang.String signatureAlgorithm) throws org.wso2.carbon.identity.oauth2.IdentityOAuth2ExceptionThis method map signature algorithm define in identity.xml to nimbus signature algorithm format, Strings are defined inline hence there are not being used any where- Parameters:
signatureAlgorithm-- Returns:
- Throws:
org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception
-
-