public class AuthenticationResponseParser extends Object
Related specifications:
| Modifier and Type | Method and Description |
|---|---|
static AuthenticationResponse |
parse(HTTPResponse httpResponse)
Parses an OpenID Connect authentication success or error response
from the specified HTTP response.
|
static AuthenticationResponse |
parse(URI uri)
Parses an OpenID Connect authentication success or error response
from the specified URI.
|
static AuthenticationResponse |
parse(URI redirectURI,
Map<String,String> params)
Parses an OpenID Connect authentication success or error response
from the specified redirection URI and parameters.
|
public static AuthenticationResponse parse(URI redirectURI, Map<String,String> params) throws ParseException
redirectURI - The base redirection URI. Must not be
null.params - The response parameters to parse. Must not be
null.ParseException - If the parameters couldn't be parsed to an
OpenID Connect authentication success or
error response.public static AuthenticationResponse parse(URI uri) throws ParseException
Example URI:
https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=xyz
uri - The URI to parse. Can be absolute or relative, with a
fragment or query string containing the authentication
response parameters. Must not be null.ParseException - If the redirection URI couldn't be parsed to
an OpenID Connect authentication success or
error response.public static AuthenticationResponse parse(HTTPResponse httpResponse) throws ParseException
Example HTTP response:
HTTP/1.1 302 Found Location: https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA&state=xyz
httpResponse - The HTTP response to parse. Must not be
null.ParseException - If the HTTP response couldn't be parsed to an
OpenID Connect authentication success or
error response.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.