com.ibm.wsspi.security.oauth20

Interface JwtAccessTokenMediator



  • public interface JwtAccessTokenMediator
    Implement this API and use it within the SPI to customize the claims for the JWT access token. The JwtAccessTokenMediator has to be implemented as a single Liberty Service or User Feature in the Liberty Server and multiple JwtAccessTokenMediator services or features will result in unpredictable behavior.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String mediateToken(java.util.Map<java.lang.String,java.lang.String[]> tokenMap)
      This method should return the claims as a JSON format string.
    • Method Detail

      • mediateToken

        java.lang.String mediateToken(java.util.Map<java.lang.String,java.lang.String[]> tokenMap)
        This method should return the claims as a JSON format string. If this method return null then default JWT will be created.
        Parameters:
        tokenMap - The access token context for this request, including client_id, user name, scopes, and other properties.
        Returns:
        The string content with the claims to be included in JWT, which can be parsed into a JSONObject.