<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_jwt_data(token, token_type):
 """ Decodes encoded JWT token by using extension setting and validates token type :param token: The encoded JWT string to decode :param token_type: JWT type for type validation (access or refresh) :return: Dictionary containing contents of the JWT """

    jwt_data = decode_jwt(
        encoded_token=token,
        secret=current_app.config['JWT_SECRET_KEY'],
        algorithm='HS256',
        identity_claim_key=current_app.config['JWT_IDENTITY_CLAIM'],
        user_claims_key=current_app.config['JWT_USER_CLAIMS']
        )

    # token type verification
    if jwt_data['type'] != token_type:
        raise WrongTokenError('Only {} tokens are allowed'.format(token_type))

    return jwt_data