|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.oauth2.sdk.auth.ClientAuthentication com.nimbusds.oauth2.sdk.auth.JWTAuthentication com.nimbusds.oauth2.sdk.auth.PrivateKeyJWT
@Immutable public final class PrivateKeyJWT
Private key JWT authentication at the Token endpoint. Implements
ClientAuthenticationMethod.PRIVATE_KEY_JWT
. This class is immutable.
Supported signature JSON Web Algorithms (JWAs) by this implementation:
Example TokenRequest
with private key JWT
authentication:
POST /token HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded grant_type=authorization_code& code=i1WsRn1uB1& client_id=s6BhdRkqt3& client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer& client_assertion=PHNhbWxwOl...[omitted for brevity]...ZT
Related specifications:
Field Summary |
---|
Fields inherited from class com.nimbusds.oauth2.sdk.auth.JWTAuthentication |
---|
CLIENT_ASSERTION_TYPE |
Constructor Summary | |
---|---|
PrivateKeyJWT(com.nimbusds.jwt.SignedJWT clientAssertion,
ClientID clientID)
Creates a private key JWT authentication. |
Method Summary | |
---|---|
static Set<com.nimbusds.jose.JWSAlgorithm> |
getSupportedJWAs()
Gets the set of supported signature JSON Web Algorithms (JWAs) by this implementation of private key JSON Web Token (JWT) authentication. |
static PrivateKeyJWT |
parse(HTTPRequest httpRequest)
Parses the specified HTTP POST request for a private key JSON Web Token (JWT) authentication. |
static PrivateKeyJWT |
parse(Map<String,String> params)
Parses the specified parameters map for a private key JSON Web Token (JWT) authentication. |
static PrivateKeyJWT |
parse(String paramsString)
Parses a private key JSON Web Token (JWT) authentication from the specified application/x-www-form-urlencoded encoded
parameters string. |
Methods inherited from class com.nimbusds.oauth2.sdk.auth.JWTAuthentication |
---|
applyTo, ensureClientAssertionType, getClientAssertion, getClientID, getJWTAuthenticationClaimsSet, parseClientAssertion, parseClientID, toParameters |
Methods inherited from class com.nimbusds.oauth2.sdk.auth.ClientAuthentication |
---|
getMethod |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrivateKeyJWT(com.nimbusds.jwt.SignedJWT clientAssertion, ClientID clientID)
clientAssertion
- The client assertion, corresponding to the
client_assertion
parameter, as an RSA
or ECDSA-signed JWT. Must not be
null
.clientID
- Optional client identifier, corresponding to
the client_id
parameter. null
if not specified.Method Detail |
---|
public static Set<com.nimbusds.jose.JWSAlgorithm> getSupportedJWAs()
public static PrivateKeyJWT parse(Map<String,String> params) throws ParseException
application/x-www-form-urlencoded
encoded.
params
- The parameters map to parse. The private key JSON
Web Token (JWT) parameters must be keyed under
"client_assertion" and "client_assertion_type". The
map must not be null
.
ParseException
- If the parameters map couldn't be parsed to a
private key JSON Web Token (JWT)
authentication.public static PrivateKeyJWT parse(String paramsString) throws ParseException
application/x-www-form-urlencoded
encoded
parameters string.
paramsString
- The parameters string to parse. The private key
JSON Web Token (JWT) parameters must be keyed
under "client_assertion" and
"client_assertion_type". The string must not be
null
.
ParseException
- If the parameters string couldn't be parsed
to a private key JSON Web Token (JWT)
authentication.public static PrivateKeyJWT parse(HTTPRequest httpRequest) throws ParseException
httpRequest
- The HTTP POST request to parse. Must not be
null
and must contain a valid
application/x-www-form-urlencoded
encoded
parameters string in the entity body. The private
key JSON Web Token (JWT) parameters must be
keyed under "client_assertion" and
"client_assertion_type".
ParseException
- If the HTTP request header couldn't be parsed
to a private key JSON Web Token (JWT)
authentication.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |