No getState() method in AuthenticationResponse

Issue #98 resolved
Pétur Runólfsson created an issue

Checking the "state" parameter in an AuthenticationResponse requires a cast:

      AuthenticationResponse response = AuthenticationResponseParser.parse(
              redirectURI, queryParameters);

      State responseState = ((AuthorizationResponse) response).getState();

This seems a bit off - the classes that implement AuthenticationResponse all have a getState() method. Ideally, I'd like AuthenticationResponse to extend AuthorizationResponse, but if that's not practical (as one is a class and the other an interface), declaring a getState() method in AuthenticationResponse would be sufficient.

Comments (3)

  1. Log in to comment