Class SAMLTokenHandler

  • All Implemented Interfaces:
    LightHttpHandler, MiddlewareHandler, io.undertow.server.HttpHandler

    public class SAMLTokenHandler
    extends Object
    implements MiddlewareHandler
    This is a middleware handler that is responsible for getting a JWT access token from OAuth 2.0 provider for the particular router client. In this use case it is assumed the client has a signed saml and a signed JWT token in the incoming HTTP headers. These two tokens will be passed to the authorization server to get the JWT access token. This handler will also be responsible for checking if the cached token is about to expired or not. In which case, it will renew the token in another thread. When request comes and the cached token is already expired, then it will block the request and go to the OAuth provider to get a new token and then resume the request to the next handler in the chain. This handler is very similar to the TokenHandler except it doesn't use the client credential grant type.