public static Base64URL getAccessTokenHash(JWSAlgorithm signingAlg, OAuth2AccessTokenEntity token) {

		byte[] tokenBytes = token.getJwt().serialize().getBytes();

		return getHash(signingAlg, tokenBytes);

	}
@Test
	public void getAccessTokenHash384() {

		/*
		 * independently generate hash
		 ascii of token = eyJhbGciOiJub25lIn0.eyJhbGciOiJFUzM4NCIsInN1YiI6ImFub3RoZXJfdXNlciIsImlzcyI6Ind3dy5hbm90aGVyLWV4YW1wbGUubmV0IiwidHlwIjoiSldUIn0.
		 base64url of hash = BWfFK73PQI36M1rg9R6VjMyWOE0-XvBK
		 */

		mockToken384.getJwt().serialize();
		Base64URL expectedHash = new Base64URL("BWfFK73PQI36M1rg9R6VjMyWOE0-XvBK");

		Base64URL resultHash = IdTokenHashUtils.getAccessTokenHash(JWSAlgorithm.ES384, mockToken384);

		assertEquals(expectedHash, resultHash);
	}