public class AuthorizationContextProvider extends Object
AuthorizationContext, given that we've been
provided a webserver-implementation-specific factory that can provide current request information.| Modifier and Type | Field and Description |
|---|---|
static long |
TIMESTAMP_VALIDITY_PERIOD_SECONDS |
| Constructor and Description |
|---|
AuthorizationContextProvider(CurrentRequestAuthInfoFactory currentRequestAuthInfoFactory,
HttpMessageSigner httpMessageSigner) |
| Modifier and Type | Method and Description |
|---|---|
AuthorizationContext |
get()
Get the current
AuthorizationContext.The returned context has been verified to ensure that the request itself was correctly signed by the partner-owned key identified in the supplied AuthorizationHeader.By this point, no verification has been performed as to whether the signing partner is authorized to access any entities referenced within the request body itself. |
public static final long TIMESTAMP_VALIDITY_PERIOD_SECONDS
public AuthorizationContextProvider(CurrentRequestAuthInfoFactory currentRequestAuthInfoFactory, HttpMessageSigner httpMessageSigner)
currentRequestAuthInfoFactory - Framework specific factory implementation to get hold of CurrentRequestAuthInfo for verificationhttpMessageSigner - A HttpMessageSigner, used for verifying the signaturepublic AuthorizationContext get() throws AuthorizationException
AuthorizationContext.AuthorizationHeader.AuthorizationContext. Does not return null.AuthorizationException - If the Authorization header is invalid or not supplied by the client.Copyright © 2020. All rights reserved.